Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug report
- X-seq: zsh-workers 34059
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: mvxxc@xxxxxx, zsh-workers@xxxxxxx
- Subject: Re: Bug report
- Date: Fri, 26 Dec 2014 18:35:16 -0800
- In-reply-to: <20141226165344.GC1003@basilisk>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20141226165344.GC1003@basilisk>
On Dec 26, 5:53pm, mvxxc@xxxxxx wrote:
} Subject: Bug report
}
} If the following script is run in an empty directory, zsh executes the
} defined function only once.
Changing this line:
} set -e
To "set -exv" shows that func is in fact called twice but exits without
doing anything on the second call.
I therefore suspect one of workers/32568 or workers/32569.
This is very tricky because we have to propagate the value of $? from
before the "for" keyword (including before the start of the function)
into the "do" body, but must *not* *use* the value of $? for deciding
whether to exit-on-error, because the nonzero value came from an "if"
test. There is a "noerrexit" flag that is supposed to cover this case,
but it's not set when the very first "sublist" in a function body is
a for-loop (there are likely to be other similar cases).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author