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

Re: forwarded bug report



Sven Wischnowsky wrote:
> Markus F.X.J. Oberhumer wrote:
> >   compctl -s "\$(cat [tT]his-file-does-not-exist)" foo
> 
> When expanding the -s-string, we explicitly switch NULL_GLOB on so
> that `compctl -s "*.c \$(< foo)"' works without producing an error if
> there is no `*.c'.
> Of course, this makes it fail in cases like the one above... (where
> the cat tries to start reading and never finishes).
> 
> Does anyone have an idea how we could make this safe?

I though of playing around with CSH_NULL_GLOB like options, but couldn't
get that to work reasonably.  One possibility is to timeout $(...)'s when
they occur inside zle.  However, I think the real bug here is that for some
reason it takes two ^C's to stop it.  Fixing that would just leave the user
with the reponsibility of testing difficult cases (and adding /dev/null on
the end if necessary).

-- 
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