Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: About 'test' compatibility
- X-seq: zsh-workers 16723
- From: DervishD <raul@xxxxxxxxxxxx>
- To: schaefer@xxxxxxxxxxxxxxxx
- Subject: Re: About 'test' compatibility
- Date: Tue, 26 Feb 2002 22:39:45 +0100
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <Pine.LNX.4.33.0202261259290.14523-100000@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: ViaDomus
- References: <Pine.LNX.4.33.0202261259290.14523-100000@xxxxxxxxxxxxxxxx>
- Reply-to: DervishD <raul@xxxxxxxxxxxx>
- Sender: DervishD <raul@xxxxxxxxxxxx>
Hello Bart :)
>> >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 `='
>..."
Just curiosity: why BASH doesn't fail here too? The 'test'
builtin of the Bourne shell has the '-d' too.
>This should be written as
> if [ "x$DEFAULT" = "x-d" -a -n "$3" ]; then
>or something similar.
I'll notify the maintainer. Thanks for your help :)
Raúl
Messages sorted by:
Reverse Date,
Date,
Thread,
Author