zsh-users
 help / color / mirror / code / Atom feed
* ANDing Glob Qualifiers
@ 2007-09-29  8:14 Atom Smasher
  2007-09-29  9:57 ` Stephane Chazelas
  0 siblings, 1 reply; 3+ messages in thread
From: Atom Smasher @ 2007-09-29  8:14 UTC (permalink / raw)
  To: zsh-users

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.


-- 
         ...atom

  ________________________
  http://atom.smasher.org/
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"If young people don't turn on to politics,
 	 politics will turn on them."
 		-- Ralph Nader



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ANDing Glob Qualifiers
  2007-09-29  8:14 ANDing Glob Qualifiers Atom Smasher
@ 2007-09-29  9:57 ` Stephane Chazelas
  2007-09-29 10:14   ` Atom Smasher
  0 siblings, 1 reply; 3+ messages in thread
From: Stephane Chazelas @ 2007-09-29  9:57 UTC (permalink / raw)
  To: Atom Smasher; +Cc: zsh-users

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ANDing Glob Qualifiers
  2007-09-29  9:57 ` Stephane Chazelas
@ 2007-09-29 10:14   ` Atom Smasher
  0 siblings, 0 replies; 3+ messages in thread
From: Atom Smasher @ 2007-09-29 10:14 UTC (permalink / raw)
  To: zsh-users

On Sat, 29 Sep 2007, Stephane Chazelas wrote:

> *(.LK-1)
>
> expands to the files that are "regular" AND "whose length is less than 
> 1kB".
=================

thanks... that's the case i overlooked.


-- 
         ...atom

  ________________________
  http://atom.smasher.org/
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"The more laws, the less justice."
 		-- Marcus Tullius Cicero De Officiis



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-29 10:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-29  8:14 ANDing Glob Qualifiers Atom Smasher
2007-09-29  9:57 ` Stephane Chazelas
2007-09-29 10:14   ` Atom Smasher

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).