Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: About 'test' compatibility
- X-seq: zsh-workers 16722
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: DervishD <raul@xxxxxxxxxxxx>
- Subject: Re: About 'test' compatibility
- Date: Tue, 26 Feb 2002 13:33:15 -0800 (PST)
- Cc: <zsh-workers@xxxxxxxxxx>
- In-reply-to: <3C7BEFD4.mail4HW1FAJ7V@xxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Sender: <schaefer@xxxxxxxxxxxxxxxx>
On Tue, 26 Feb 2002, DervishD wrote:
> >Can you give an example of the way this is failing?
>
> if [ "$DEFAULT" = "-d" -a -n "$3" ]; then
>
> Maybe the '-n' following '-a' is confusing zsh?
No, it's the -d in $DEFAULT that's confusing it. When $DEFAULT is -d, zsh
is treating the above as "if there is a directory named `=' ..."
This should be written as
if [ "x$DEFAULT" = "x-d" -a -n "$3" ]; then
or something similar.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author