From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: behavior of test true -a \( ! -a \)
Date: Mon, 25 Mar 2024 08:21:53 -0700 [thread overview]
Message-ID: <CAH+w=7YmaSdFi90g8HQ40AmVAWNRAsy5YuOsBaqSGriCsFosDA@mail.gmail.com> (raw)
In-Reply-To: <20240325102354.GA617604@cventin.lip.ens-lyon.fr>
On Mon, Mar 25, 2024 at 3:24 AM Vincent Lefevre <vincent@vinc17.net> wrote:
>
> On 2024-03-23 15:41:33 -0700, Bart Schaefer wrote:
> > On Sat, Mar 23, 2024 at 3:20 PM Vincent Lefevre <vincent@vinc17.net> wrote:
> > >
> > > On 2024-03-23 14:48:36 -0700, Bart Schaefer wrote:
> > > > I'd therefore argue that it's actually
> > > >
> > > > % test \( ! -a \)
> > > >
> > > > that is wrong
> > >
> > > POSIX specifies what happens with up to 4 arguments.
> >
> > Ok, but
> >
> > % test \( ! -a \) \)
> >
> > has five [...]
>
> I meant that
>
> test \( ! -a \)
>
> has four, thus fully specified and not wrong.
And I meant (in the follow-up, being unaware of the exact spec at
first) that I think it was wrong to specify it that way in the first
place.
I suspect that we're re-hashing an argument that's already been had on
austin-group and led to these constructs being first declared obsolete
and soon dropped.
> Concerning
>
> test true -a \( ! -a \)
>
> I would say that if you decide that the first "-a" is an "and",
> then after this "-a", there remain exactly 4 arguments, so that
> for *consistency*, I think that the remaining 4 arguments should
> be interpreted exactly as in
>
> test \( ! -a \)
So what about
test true -a \( ! -a \) \)
??
Counting arguments just doesn't work.
next prev parent reply other threads:[~2024-03-25 15:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 10:07 Vincent Lefevre
2024-03-21 10:28 ` Peter Stephenson
2024-03-21 11:04 ` Vincent Lefevre
2024-03-21 11:29 ` Peter Stephenson
2024-03-21 12:18 ` Vincent Lefevre
2024-03-21 12:25 ` Peter Stephenson
2024-03-21 19:06 ` Bart Schaefer
2024-03-22 5:02 ` Bart Schaefer
2024-03-25 16:38 ` Peter Stephenson
2024-03-25 17:36 ` Bart Schaefer
2024-04-03 13:59 ` Vincent Lefevre
2024-03-21 17:39 ` Bart Schaefer
2024-03-23 21:48 ` Bart Schaefer
2024-03-23 22:20 ` Vincent Lefevre
2024-03-23 22:41 ` Bart Schaefer
2024-03-23 23:33 ` Lawrence Velázquez
2024-03-24 0:14 ` Bart Schaefer
2024-03-24 2:52 ` Lawrence Velázquez
2024-03-25 10:23 ` Vincent Lefevre
2024-03-25 15:21 ` Bart Schaefer [this message]
2024-03-25 17:33 ` Vincent Lefevre
2024-03-25 17:43 ` 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='CAH+w=7YmaSdFi90g8HQ40AmVAWNRAsy5YuOsBaqSGriCsFosDA@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/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).