Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: globbing in conditional expressions
Bart Schaefer wrote on Thu, May 29, 2014 at 20:59:56 -0700:
> On May 26, 11:52pm, Daniel Shahaf wrote:
> }
> }
> } Bart Schaefer wrote on Thu, May 15, 2014 at 07:50:03 -0700:
> } > adding a globbing flag (#X) [where I'm using X as a placeholder rather
> } > than a suggestion for the actual flag] which means that the glob returns
> } > only the first matching file it stumbles upon.
> } >
> } > In fact if you had that flag you wouldn't need -m as a condition op, it
> } > would suffice to do [ ! -z pat(NX) ].
> }
> } That turned out to be much less code to implement. It's attached, if
> } anyone finds it useful.
>
> I like this one. Is there a mnemonic for your choice of (Y) ?
No.
That said, if it's to be commonly used with (N), then (NY) does serve as
a memorable syntax.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author