From: DervishD <raul@viadomus.com>
To: schaefer@brasslantern.com
Cc: zsh-workers@sunsite.dk
Subject: Re: About 'test' compatibility
Date: Tue, 26 Feb 2002 21:28:04 +0100 [thread overview]
Message-ID: <3C7BEFD4.mail4HW1FAJ7V@viadomus.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0202261211590.14523-100000@ns1.sodaware.com>
Hello Bart :))
First, thanks for your answer: *real* fast ;))
>Can you give an example of the way this is failing?
Yes, this is the line:
if [ "$DEFAULT" = "-d" -a -n "$3" ]; then
do something
else
do another thing
fi
Well, when DEFAULT is '-d' and there is a third parameter (in
this case $3 has the value 'n') the 'something' is not done. The
'another thing' is done instead :??
>Zsh 'test' does support -a for "and" but only when it appears as an
>infix operator, e.g.
Maybe the '-n' following '-a' is confusing zsh?
>which zsh would interpret as infix -a only if $foo were non-empty. The
>correct test would be
> [ "$foo" -a "$bar" ]
This is the case. Maybe I'm missing something, I'm afraid.
Thanks a lot for your answer, Bart.
Raúl
next prev parent reply other threads:[~2002-02-26 20:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-26 20:07 DervishD
2002-02-26 20:16 ` Bart Schaefer
2002-02-26 20:28 ` DervishD [this message]
2002-02-26 21:33 ` Bart Schaefer
2002-02-26 21:39 ` DervishD
2002-02-26 22:17 ` Bart Schaefer
2002-02-27 10:36 ` DervishD
2002-02-28 5:47 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C7BEFD4.mail4HW1FAJ7V@viadomus.com \
--to=raul@viadomus.com \
--cc=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).