From: Ronald Fischer <ynnor@mm.st>
To: "Zsh Mailing-List" <zsh-users@zsh.org>
Subject: Possible bug: Zsh function does not terminate when ${name:?word} fails
Date: Wed, 14 Sep 2016 10:00:44 +0200 [thread overview]
Message-ID: <1473840044.77968.725190513.460F8572@webmail.messagingengine.com> (raw)
(See also for a complete discussion:
http://stackoverflow.com/questions/39463547/zsh-function-does-not-terminate-when-nameword-fails?noredirect=1#comment66276136_39463547)
I have in my .zshrc the following function definition (simplified
example):
function foo {
local p=${1:?parameter missing}
echo continue ....
}
Running the function by just typing foo produces, as expected, the
message parameter missing, but it also outputs continue. I had expected
that the function terminates when the :? check fails, but it continues
to run.
I tested this with zsh 5.1.1, but I was informed that this behaviour
also can be reproduced with zsh 5.2
Ronald
next reply other threads:[~2016-09-14 8:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20160914080154eucas1p11c49e4dd5f0d45f92deaef1ce08099de@eucas1p1.samsung.com>
2016-09-14 8:00 ` Ronald Fischer [this message]
2016-09-14 8:19 ` Mikael Magnusson
2016-09-14 11:21 ` Ronald Fischer
2016-09-14 16:20 ` Bart Schaefer
2016-09-14 19:08 ` Mikael Magnusson
2016-09-14 9:19 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473840044.77968.725190513.460F8572@webmail.messagingengine.com \
--to=ynnor@mm.st \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).