Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: About 'test' compatibility
- X-seq: zsh-workers 16720
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: DervishD <raul@xxxxxxxxxxxx>
- Subject: Re: About 'test' compatibility
- Date: Tue, 26 Feb 2002 12:16:54 -0800 (PST)
- Cc: Zsh <zsh-workers@xxxxxxxxxx>
- In-reply-to: <3C7BEB12.mailIC1111B0Z@xxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Sender: <schaefer@xxxxxxxxxxxxxxxx>
On Tue, 26 Feb 2002, DervishD wrote:
> I'm trying to use zsh for building the linux kernel, but the
> configuration scripts make use of the '[' builtin, and assume that
> '-a' means 'and', and not 'true if file exists'.
Can you give an example of the way this is failing?
Zsh 'test' does support -a for "and" but only when it appears as an infix
operator, e.g.
[ foo -a bar ] is true
[ foo -a "" ] is false
[ "" -a bar ] is false
[ -a bar ] is true if file "bar" exists, else false
My suspicion would be that the kernel build is doing something like
[ $foo -a $bar ]
which zsh would interpret as infix -a only if $foo were non-empty. The
correct test would be
[ "$foo" -a "$bar" ]
and if that is indeed the issue, the kernel build scripts really should be
fixed.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author