Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: globbing in conditional expressions

Bart Schaefer wrote on Wed, May 14, 2014 at 21:55:57 -0700:
> On May 14, 12:18am, Bart Schaefer wrote:
> } to use [ -m ... ] anyway because the glob pattern would expand before
> } the call to the test builtin.
> Playing with this, I find that you can quote the pattern [ -m 'pat' ].
> However, quoting the pattern in [[ -m 'pat' ]] does not have the
> expected effect -- a glob is performed even though the pattern was
> quoted, so there's no way to make ? * [ ] match literally.  Perhaps
> not a show-stopper.
> } check path searches like **/zero* and whether glob flags work right?
> I tried this and it appears glob patterns confuse things:
> So, still a few issues to iron out.

Indeed.  Thanks for taking the time to test drive this.  I don't have
much time for this; if I make progress I'll post a new iteration to the
list, but in the meantime, perhaps someone else interested in the patch
could pick it up and make a new version.



Messages sorted by: Reverse Date, Date, Thread, Author