Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ANDing Glob Qualifiers
- X-seq: zsh-users 11891
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Atom Smasher <atom@xxxxxxxxxxx>
- Subject: Re: ANDing Glob Qualifiers
- Date: Sat, 29 Sep 2007 10:57:32 +0100
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20070929081454.88973.qmail@xxxxxxxxxxx>
- Mail-followup-to: Atom Smasher <atom@xxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070929081454.88973.qmail@xxxxxxxxxxx>
On Sat, Sep 29, 2007 at 08:14:46PM +1200, Atom Smasher wrote:
> man zshexpn; FILENAME GENERATION; Glob Qualifiers
> line 1765...
>
> More than one of these lists can be combined, separated by commas. The
> whole list matches if at least one of the sublists matches (they are
> `or'ed, the qualifiers in the sublists are `and'ed). Some qualifiers,
> however, affect all matches generated, independent of the sublist in which
> they are given.
>
> is it possible to AND two or more qualifiers? i read the part about
> BARE_GLOB_QUAL and EXTENDED_GLOB (does the former even exist?) and i
> haven't seen how to AND two or more qualifiers.
[...]
Not sure what you mean
*(.LK-1)
expands to the files that are "regular" AND "whose length is
less than 1kB".
*(.,LK-1)
expands to files that are either "regular" OR "whose length is
less than 1kB.
(*foo*|*bar*)
expands to files whose name contains either "foo" OR "bar"
*foo*~^*bar*
(with EXTENDED_GLOB) expands to files whose name contains both
"foo" AND "bar".
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author