From: "Lawrence Velázquez" <vq@larryv.me>
To: "Christoph Anton Mitterer" <calestyo@scientia.org>,
"Emma Tebibyte" <emma@tebibyte.media>
Cc: dash@vger.kernel.org
Subject: Re:
Date: Thu, 07 Dec 2023 00:29:57 -0500 [thread overview]
Message-ID: <1e6c9620-8e39-49de-ab17-717d370abec9@app.fastmail.com> (raw)
In-Reply-To: <6de0c5958bf8c0327b7d62ad681345417481f16a.camel@scientia.org>
On Thu, Dec 7, 2023, at 12:00 AM, Christoph Anton Mitterer wrote:
> On Wed, 2023-12-06 at 21:40 -0700, Emma Tebibyte wrote:
>> I found a bug in dash version 0.5.12 where when shifting more than
>> ?#,
>> the shell exits before evaluating a logical OR operator.
>
> AFAIU from POSIX this is perfectly valid behaviour:
>
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#shift
>
>> EXIT STATUS
>> If the n operand is invalid or is greater than "$#", this may be
>> considered a syntax error and a non-interactive shell may exit; if
>> the shell does not exit in this case, a non-zero exit status shall
>> be returned. Otherwise, zero shall be returned.
See also Section 2.8.1 [*], which states that interactive shells
shall not exit on special built-in utility errors and that:
In all of the cases shown in the table where an interactive
shell is required not to exit, the shell shall not perform
any further processing of the command in which the error
occurred.
[*] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_01
--
vq
prev parent reply other threads:[~2023-12-07 5:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 4:40 Emma Tebibyte
2023-12-07 5:00 ` Christoph Anton Mitterer
2023-12-07 5:29 ` Lawrence Velázquez [this message]
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=1e6c9620-8e39-49de-ab17-717d370abec9@app.fastmail.com \
--to=vq@larryv.me \
--cc=calestyo@scientia.org \
--cc=dash@vger.kernel.org \
--cc=emma@tebibyte.media \
/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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).