Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
skipping assignment and function statements; Interactive comments
- X-seq: zsh-workers 25512
- From: "Rocky Bernstein" <rocky.bernstein@xxxxxxxxx>
- To: "Zsh hackers list" <zsh-workers@xxxxxxxxxx>
- Subject: skipping assignment and function statements; Interactive comments
- Date: Sat, 23 Aug 2008 00:15:31 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=tBOqQAYHl4kQmGKZhcelOB5UTWVLWa7ArqSglaclAE0=; b=oC9NEU//m5v1icVFa1jTkfVTZC44AV5HGfS4h8SYZ8iSjqmMs6+jKKeUo8Kmn3AhZ5 SfZ/kU+EzrxiJNVn8EGERPP6wsXCFdZMgSSQjenxW/Dgjd/jj9Awsn18PfXgV8uHJgkB ly//OqIdglGpqnBVynpejvpq3X/qMv6kDgoI4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=cdinN/0JKeKb2nwjjS70zdfZAUmAoQRb1qeRoQRTdcLGnZtuSHq8lNmnTglXn/mtR7 CJqonEMBofnWZniakx3plCyuoaap4ze1huomyMWQgDuIKYpBpRpnobvRWPqedWWGMRmE munKnjhtcxnswkNmiXGlGFovLpH+CejjKbeWc=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
I just added a skip command to zshdb (and committed to github), but it
seems that assignment statements and function definitions are not
really skipped.
Consider this example which is slightly modified from the regession
test that was put in when it was implimented:
setopt localtraps localoptions debugbeforecmd
trap '(( LINENO == 4 )) && setopt errexit' DEBUG
x=three
x=four # Statement is supposed to be skipped
print $LINENO five
print x is $x
The output I get is:
5 five
x is four
And if the statement were a function definition, e.g.
x() { return 4; }
I think x would get defined as a funciton
- - -
In tracking something else down I read this in zshoptions under
INTERACTIVE_COMMENTS:
"Allow comments even in interactive shells".
I find this phrasing a little weird as it It seems to imply that one
never would want to write a comments, but sometimes one has to break
down and do it in an interactive shell. :-)
Perhaps the word "even" should be removed.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author