On 28-Dec-99 Peter Jeremy wrote:
> $ zsh -c '[ 1 -ne 0 ] && echo correct'
> correct
> $ zsh -c '/bin/[ 1 -ne 0 ] && echo correct'
> zsh: bad pattern: /bin/[
> $
>
> (Found by accident whilst looking into the original problem - I haven't,
> but probably should, report it as a bug in zsh 3.0.5).
I don't think so. It's a regex thing - you're supposed to escape the [ since
it's parsed by the shell as a regex.. (just like parentheses, semicolons,
stars, tildes, and so on).
<2 5011-0> (99-12-28 20:02:04) [will@shadow ~]% /bin/\[ 1 -ne 0 && echo correct
correct
<2 5012-0> (99-12-28 20:02:11) [will@shadow ~]% [ 1 -ne 0 ] && echo correct
correct
FWIW:
<2 5002-0> (99-12-28 20:03:38) [will@shadow ~]% pkg_info -Ia | grep zsh
zsh-3.1.6 The Z shell (development version)
<2 5003-0> (99-12-28 20:03:39) [will@shadow ~]% grep will /etc/passwd
will:*:1000:1000:Will Andrews:/home/will:/usr/local/bin/zsh
..although I'm not sure why /bin/[ behaves like this:
<2 5004-0> (99-12-28 20:03:47) [will@shadow ~]% /bin/\[ 1 -ne 0 ] && echo
correct
[: ]: unexpected operator
*shrug* could be some weird kink. :-)
--
Will Andrews <[EMAIL PROTECTED]>
GCS/E/S @d- s+:+>+:- a--->+++ C++ UB++++ P+ L- E--- W+++ !N !o ?K w---
?O M+ V-- PS+ PE++ Y+ PGP+>+++ t++ 5 X++ R+ tv+ b++>++++ DI+++ D+
G++>+++ e->++++ h! r-->+++ y?
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message