* zlogout not finishing when errors
@ 2004-03-23 18:49 Thorsten Kampe
2004-03-23 20:30 ` Thorsten Kampe
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Kampe @ 2004-03-23 18:49 UTC (permalink / raw)
To: zsh-users
[zsh 4.1.1]
If have put some "cp" commands in my .zlogout. Some files are
sometimes "nonexistant" - depending on the host and the mounts. So I
simply wanted to redirect stderr to /dev/null.
To my surprise when of these commands errors ("cp nonexistant_file
destination") the rest of .zlogout is not read. So I had to put a "if
[[ -r $file ]]" into .zlogout to make this file finish until the end.
Of course this is not the behaviour of the other rcfiles (.zprofile,
.zshrc, etc.).
So my question is: is this a known thing (a bug or a feature)?
Thorsten
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: zlogout not finishing when errors
2004-03-23 18:49 zlogout not finishing when errors Thorsten Kampe
@ 2004-03-23 20:30 ` Thorsten Kampe
0 siblings, 0 replies; 2+ messages in thread
From: Thorsten Kampe @ 2004-03-23 20:30 UTC (permalink / raw)
To: zsh-users
* Thorsten Kampe (2004-03-23 19:49 +0100)
> [zsh 4.1.1]
>
> If have put some "cp" commands in my .zlogout. Some files are
> sometimes "nonexistant" - depending on the host and the mounts. So I
> simply wanted to redirect stderr to /dev/null.
>
> To my surprise when of these commands errors ("cp nonexistant_file
> destination") the rest of .zlogout is not read. So I had to put a "if
> [[ -r $file ]]" into .zlogout to make this file finish until the end.
>
> Of course this is not the behaviour of the other rcfiles (.zprofile,
> .zshrc, etc.).
>
> So my question is: is this a known thing (a bug or a feature)?
Okay I found it out (with a little help from PWS): it was the "setopt
errreturn".
So two questions remain:
1. Who put this setting in my .zshrc ;-)?
2. Why don't the login rcfiles terminate when an error occurs - and
just the logout file?
Thorsten
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-23 20:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-23 18:49 zlogout not finishing when errors Thorsten Kampe
2004-03-23 20:30 ` Thorsten Kampe
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).