Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Function code breaking out of if then ...fi



On Fri, 09 Nov 2012 17:13:19 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> I believe I know the reason for this behavior, and perhaps it points to a
> bug:
> 
> When reading a startup file such as .zshrc, there is an intent to avoid
> skipping the entire configuration just because of one erroneous command
> somewhere in the middle.

I've a vague memory of this too, but evidence suggests it's not showing
CONTINUE_ON_ERROR behaviour (this is before my patch):


% cat ~/tmp/zdotdir/.zshrc
print First line
echo *fumblewumble*
print Second line
% ZDOTDIR=~/tmp/zdotdir zsh
First line
/home/pws/tmp/zdotdir/.zshrc:2: no matches found: *fumblewumble*
% exit     # <- this is the prompt inside the new shell
% zsh ~/tmp/zdotdir/.zshrc 
First line
/home/pws/tmp/zdotdir/.zshrc:2: no matches found: *fumblewumble*
Second line


So if that was the intention, we've already messed it up.  A bit of
historical research might be interesting.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author