|
Home > Archive > Unix Shell > November 2005 > zsh "always", manpage error?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
zsh "always", manpage error?
|
|
| Enrique Perez-Terron 2005-11-27, 5:52 pm |
| Hello,
I have just started looking at zsh, and I see in zshmisc(1):
{ try-list } always { always-list }
... execute always-list.
Execution then continues from the result of the execution of
try-list; in other words, any error, or break, continue, or
return command is treated in the normal way, as if always-list
were not present.
...
Regardless of TRY_BLOCK_ERROR, after the end of always-list
the normal shell status $? is the value returned from always-list.
This will be non-zero if there was an error, even if
TRY_BLOCK_ERROR was set to zero.
This sounds like a contradiction.
% { false } always { true }; echo $?
1
This seems to conform to the first paragraph above, and contradicts
the second. After the end of the always-list the normal shell status
$? is 1 as returned from try-list, not the value returned from
always-list.
% { true } always { false }; echo $?
0
The same. Am I missing something?
-Enrique
| |
| Bill Marcum 2005-11-27, 5:53 pm |
| On Sun, 27 Nov 2005 16:40:13 +0100, Enrique Perez-Terron
<enrio@online.no> wrote:
empty message, posting error?
--
"Buy land. They've stopped making it."
-- Mark Twain
| |
| Enrique Perez-Terron 2005-11-28, 6:04 pm |
| On Sun, 27 Nov 2005 19:44:15 +0100, Bill Marcum <bmarcum@iglou.com> wrote:
> On Sun, 27 Nov 2005 16:40:13 +0100, Enrique Perez-Terron
> <enrio@online.no> wrote:
>
> empty message, posting error?
You'll have to reload the message. It was reflected with contents from my news
server, and I also find it with contents on google:
http://groups.google.com/group/comp...4860326fbb52d2b
-Enrique
|
|
|
|
|