zsh-users
 help / color / mirror / code / Atom feed
* ${name:?word} get executed though -n specified
@ 2011-07-01  9:41 hanpingtian
  0 siblings, 0 replies; only message in thread
From: hanpingtian @ 2011-07-01  9:41 UTC (permalink / raw)
  To: zsh-workers, zsh-users

[-- Attachment #1: Type: text/plain, Size: 285 bytes --]

hey,

I just noticed that even though -n option specified for checking syntax of a script, the ${xxx:?yyy} still gets executed:

[hpt@hpt]/tmp% cat t.sh
#!/bin/zsh
a=${a:?'not set!'}

echo $a
date
[hpt@hpt]/tmp% zsh -n ./t.sh
./t.sh:2: a: 'not set!'
[hpt@hpt]/tmp%

Is this a problem?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-01  9:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-01  9:41 ${name:?word} get executed though -n specified hanpingtian

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).