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

Re: strange glob expansion



Bart Schaefer écrivait :
> On Sep 2, 12:15pm, Hubert Canon wrote:
> } Not exactly. The { , } construct is somewhat different than ( | ) :
> } for example, when one of the partterns fails, the whole expression
> } fails.
> 
> That's what `setopt cshnullglob` is for.  I can't imagine why anyone would
> not want that option when the shell is interactive; brace expansion is
> practically useless without it.

I use brace expansion with for constructs most or the time :

for i in {foo,bar,hux}; do touch $i; done

And I don't like setopt cshnullglob because it gives strange behaviour
when I use a single globbing pattern which fails. Like :

grep foo*bar | less

If foo*bar matches nothing, it's exactly like : grep | less
which stops, waiting for input.

It a matter of taste, and that's why options a for.

-- 
Hubert Canon



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