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

Re: forwarded bug report



Sven Wischnowsky wrote:
> It seems that neither of sh, ksh, bash, and tcsh closes/redirects-to-/dev/nul
> l 
> stdin of $(...) and `...` constructs. Should we do this only only when 
> this may be called from completion?

I certainly don't think we should change it if it's not for completion, you
never know what you're going to break.  But it looks harmless if it is from
completion --- although technically stdin and the editing file descriptor
are different, I can't imagine anyone really expects reading from stdin
during a completion to be useful, so I suppose it's worth doing.

I suppose closing it is better than redirecting it from /dev/null, since
then you get an error message which will warn the user that something
happened which shouldn't have --- although a bit cryptic: cat gives me
  cat: cannot stat 
Are there cases where this is bad?

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



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