Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Filename Generation - *(.)
- X-seq: zsh-users 11930
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Atom Smasher <atom@xxxxxxxxxxx>
- Subject: Re: Filename Generation - *(.)
- Date: Fri, 5 Oct 2007 09:41:22 +0100
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20071005080339.19628.qmail@xxxxxxxxxxx>
- Mail-followup-to: Atom Smasher <atom@xxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20071005080339.19628.qmail@xxxxxxxxxxx>
On Fri, Oct 05, 2007 at 09:03:32PM +1300, Atom Smasher wrote:
> these do what i'd expect:
> ls ./*(.) # list all regular files in the current dir
> ls *(.) # list all regular files in the current dir
> grep foo ./*(.) # grep 'foo' from regular files in the current dir
>
> this doesn't:
> grep foo *(.)
>
> can anyone explain that?
>
> zsh 4.3.4 (amd64-portbld-freebsd6.2)
[...]
In which way does it not work?
Would you have a file whose name starts with "-" in the current
directory and a GNU grep by any chance?
In any case, when passing /unknown/ arguments (practically, if
you can't make sure none of them may start with a - or +), you
need to mark the end of options:
grep foo -- *(.)
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author