From: "Bart Schaefer" <schaefer@brasslantern.com>
To: DervishD <raul@viadomus.com>, Zsh <zsh-workers@sunsite.dk>,
Dan Nelson <dnelson@allantgroup.com>
Subject: Re: Incompatibility when Zsh invoked as 'sh'
Date: Mon, 4 Feb 2002 03:46:42 +0000 [thread overview]
Message-ID: <1020204034643.ZM20043@candle.brasslantern.com> (raw)
In-Reply-To: <E16XVpG-0006tm-00@DervishD.viadomus.com>
In-Reply-To: <20020204025121.GI6310@dan.emsphone.com>
On Feb 4, 12:13am, DervishD wrote:
}
} Well, the error is the '[*' pattern, which zsh says is a 'bat
} pattern'. Bash treats it as the regex 'match an opening bracket and
} anything after it', but zsh doesn't.
On Feb 3, 8:51pm, Dan Nelson wrote:
}
} ash does not complain; args starting with a bracket match the 1st case.
}
} pdksh-5.2.14 run as sh does not complain, but only the literal argument
} [* matches.
}
} I don't have a link to the new Single Unix spec at the moment; what's
} it say?
Anyone who registers their email address can now get the latest Single
Unix spec on line; start at http://www.unix-systems.org/version3/
The spec says:
When unquoted and outside a bracket expression, the following three
characters shall have special meaning in the specification of patterns:
? A question-mark is a pattern that shall match any character.
* An asterisk is a pattern that shall match multiple characters, as
described in Patterns Matching Multiple Characters.
[ The open bracket shall introduce a pattern bracket expression.
It goes on:
Section 9.3.5, RE Bracket Expression shall also apply to the pattern
bracket expression, except that the exclamation mark character ( '!' )
shall replace the circumflex character ( '^' ) in its role in a "non-
matching list" in the regular expression notation. A bracket expression
starting with an unquoted circumflex character produces unspecified
results.
Nothing in section 9.3.5 allows for an unmatched left-bracket to match a
literal bracket. The description of the "case" construct doesn't make
any exception to this, either.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2002-02-04 3:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-03 23:13 DervishD
2002-02-04 2:51 ` Dan Nelson
2002-02-04 3:46 ` Bart Schaefer [this message]
2002-02-04 10:14 ` Peter Stephenson
2002-02-04 10:06 DervishD
2002-02-04 10:07 DervishD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1020204034643.ZM20043@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=dnelson@allantgroup.com \
--cc=raul@viadomus.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).