Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug in patterns used for filename expansion (e.g. a[b/c]d)
- X-seq: zsh-workers 23929
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: bug in patterns used for filename expansion (e.g. a[b/c]d)
- Date: Tue, 9 Oct 2007 16:00:09 +0100
- In-reply-to: <200710091259.l99Cxifg025637@xxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20071009124055.GH22340@xxxxxxxxxxxxxxxxxxx> <200710091259.l99Cxifg025637@xxxxxxxxxxxxxx>
On Tue, Oct 09, 2007 at 01:59:44PM +0100, Peter Stephenson wrote:
> Vincent Lefevre wrote:
> > zsh 4.3.4 isn't POSIX-compliant concerning filename expansion and
> > unmatched [. POSIX[*] says:
> >
> > For example, the pattern "a[b/c]d" does not match such pathnames as
> > abd or a/d. It only matches a pathname of literally a[b/c]d.
> >
> > [*] http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#t
> > ag_02_13_03
> >
> > But with zsh 4.3.4:
> >
> > prunille% ls a[b/c]d
> > zsh: no matches found: a[b/c]d
>
> As I said on the Austin group list, this isn't a bug. It's controlled
> by the option NOMATCH; you'll find that if zsh is in compatibility mode
> that option is unset.
[...]
On the other hand:
$ mkdir -p 'a[b/c]d' abd
$ zsh -c 'echo a[b/c]d'
abd
$ ARGV0=sh zsh -c 'echo a[b/c]d'
abd
According to POSIX, it should not match abd.
But I'd agree that POSIX requirement looks a bit silly.
Cheers,
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author