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)



On 2007-10-09 13:59:44 +0100, Peter Stephenson wrote:
> 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.

OK, but these compatibility modes are not really clear, e.g. which sh
and which ksh? And what about POSIX?

In particular:

vin:~> mkdir 'a[b'
vin:~> touch 'a[b'/file

vin:~> ksh --version
zsh 4.3.4 (i686-pc-linux-gnu)
vin:~> ksh
$ ls a[b/*
ls: a[b/*: No such file or directory

vin:~> ksh93
$ ls a[b/*
> ksh93: syntax error: `[' unmatched

vin:~> ksh -c 'ls a[b/*'
ls: a[b/*: No such file or directory
vin:~> ksh93 -c 'ls a[b/*'
ls: a[b/*[: No such file or directory

vin:~> touch 'a[b/*'
vin:~> ksh93 -c 'ls a[b/*'
ls: a[b/*[: No such file or directory
vin:~> ksh -c 'ls a[b/*'
a[b/*

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)



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