Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug or misundertanding from my part?
- X-seq: zsh-workers 21735
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: Bug or misundertanding from my part?
- Date: Mon, 19 Sep 2005 17:02:04 +0200
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- In-reply-to: <14544.1127140913@xxxxxxx>
- Mail-followup-to: Peter Stephenson <pws@xxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20050919143235.GA2831@DervishD> <14544.1127140913@xxxxxxx>
Hi Peter :)
* Peter Stephenson <pws@xxxxxxx> dixit:
> > The code above just prints "try list" and exits with a return
> > code of "13", but the manual says that the ALWAYS-LIST is executed
> > "Regardless of [...] return commands encountered [...]". Am I doing
> > something wrong? I'm a bit puzzled because the above works if I
> > change 'return 13' for 'false'.
> You're running this as a script, right?
Yes.
> In that case the returns are treated
> as exits, which have an immediate effect.
I know that, but I assumed, from the documentation, that "return"
and "exit" were handled differently in any context (even in scripts).
Couldn't a little note be added to the docs in the last part, where
the warning about "An exit command encountered in try-list [...]"
already exists. I know, I know, every zsh user should take into
account that a return-is-an-exit-in-a-script, OK, but I think that it
would be a good idea to add a little reminder O:)
> To treat returns as returns you need a function.
OK, thanks for the information :))
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author