Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: strange glob expansion
- X-seq: zsh-users 2564
- From: Hubert Canon <Hubert.Canon@xxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: strange glob expansion
- Date: Fri, 3 Sep 1999 14:11:44 +0200
- Cc: zsh-users@xxxxxxxxxxxxxx
- In-reply-to: <990902150120.ZM24598@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19990901101116.A8076@xxxxxxxxxxxxxxxxx> <990901174608.ZM19896@xxxxxxxxxxxxxxxxxxxxxxx> <19990902121532.A24349@xxxxxxxxxxxxxxxxx> <990902150120.ZM24598@xxxxxxxxxxxxxxxxxxxxxxx>
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