Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
${name:?word} get executed though -n specified
- X-seq: zsh-users 16122
- From: hanpingtian <hanpingtian@xxxxxxx>
- To: zsh-workers@xxxxxxx, zsh-users@xxxxxxx
- Subject: ${name:?word} get executed though -n specified
- Date: Fri, 1 Jul 2011 17:41:07 +0800 (CST)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Received:Date:From:To:Message-ID:Subject: MIME-Version:Content-Type; bh=JxTzYMbGf6/lckIpJxIqwZHcI5+Z2qBzgc Uw8jthSSA=; b=aldHUV03ZlLc/F97Wk76k14qgIj0icrRwAQK1VAR7pUskemKPe COWoTRf5f61sTUTphPaGXisO5wDrfAxbRB9b5aNlRO5aJEyfQ4KkqcpKmY0M1gBo MmWUx292H4HErVM5v6IwFWUxcNVH72j42gEg9nx+K6ui4YMQbvF0zRz60=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author