Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Weird behavior of conditionals with exclamations (ZSH 5.0.7)
- X-seq: zsh-workers 35470
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Weird behavior of conditionals with exclamations (ZSH 5.0.7)
- Date: Sun, 14 Jun 2015 20:19:21 -0700
- In-reply-to: <CAPRQymMnbhY5CnDTsfu0r=d8u3tLask9fTaG9TNctZ4PQjRBCA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAPRQymMnbhY5CnDTsfu0r=d8u3tLask9fTaG9TNctZ4PQjRBCA@mail.gmail.com>
On Jun 14, 7:50pm, Daniel Miranda wrote:
}
} while [ -n "$str" ]; do
}
} If and only if the value of "$str" is '!', a string containing a
} single exclamation. It seems the test command somehow attempts to
} parse it as a modifier, instead of an actual string to be tested.
This has already been fixed in 5.0.8. I don't know exactly which change
covered it, but:
schaefer[825] zsh-5.0.7 -f
torch% str='!'
torch% while [ -n "$str" ]; do
while> break
while> done
[: too many arguments
torch%
schaefer[826] zsh-5.0.8 -f
torch% str='!'
torch% while [ -n "$str" ]; do
while> break
while> done
torch%
Messages sorted by:
Reverse Date,
Date,
Thread,
Author