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

Issue redirecting zsh output



Hello,

I'm looking for a way to redirect all output of an interactive shell session.
It seems to me that I would be able to do this with a call such as
"zsh >/dev/null 2>&1" (to get rid of it completely), but this doesn't seem to
be working 100%.

Below is the behaviour of bash, which works as I expected:

steve@juniper$ bash >/dev/null 2>&1
ls *
cat jdklhjshs
exit
steve@juniper$ 

And here is zsh (the '>' is to differentiate the zsh prompt from bash's '$'):
steve@juniper$ zsh >/dev/null 2>&1
steve@juniper> ls *
steve@juniper> cat jdklhjshs
steve@juniper> exit
steve@juniper$ 

As you can see, for some reason zsh's prompt is not redirected.  NB the
behaviour is the same if zsh is called from zsh instead of from bash.

Thanks for any insight!

Stephen



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