From: dana <dana@dana.is>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: franciscodezuviria@gmail.com,
"zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: [BUG] getopts OPTIND
Date: Tue, 9 Jan 2018 17:58:14 -0600 [thread overview]
Message-ID: <043D5A33-6258-4C87-9505-4AEBE17FA9FC@dana.is> (raw)
In-Reply-To: <CAH+w=7ZxSjSzrhgCWoRTPz+edFzGeODWMQPrYpMnbp26HSebsQ@mail.gmail.com>
On 9 Jan 2018, at 16:57, Bart Schaefer <schaefer@brasslantern.com> wrote:
>There's a whole thread from 2015 related to this, beginning with workers/35317
Oops, sure enough. Sorry.
Well, i'm not sure about POSIX correctness, but for whatever it's worth, i can
confirm that all of the following are in agreement as to how it should behave:
ash (BusyBox)
bash
dash
ksh93
mksh
posh
The ksh that comes with OpenBSD (derived from pdksh i think) seems to stop
updating OPTIND after it encounters an invalid option until it finds either a
legal one or the end of the argument list; after that it's set back to the
correct value.
yash just seems broken somehow, it gives me nonsense.
dana
next prev parent reply other threads:[~2018-01-09 23:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 16:22 Francisco de Zuviría Allende
2018-01-09 22:48 ` dana
2018-01-09 22:57 ` Bart Schaefer
2018-01-09 23:58 ` dana [this message]
2018-01-10 1:32 ` Francisco de Zuviría Allende
2018-01-10 9:05 ` Peter Stephenson
2021-04-13 23:28 ` dana
2021-04-14 13:04 ` [BUG] getopts OPTIND - yash's behaviour Daniel Shahaf
2021-04-14 13:08 ` [BUG] getopts OPTIND Daniel Shahaf
2021-04-18 5:16 ` dana
2021-04-20 21:31 ` Daniel Shahaf
2021-05-03 23:38 ` dana
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=043D5A33-6258-4C87-9505-4AEBE17FA9FC@dana.is \
--to=dana@dana.is \
--cc=franciscodezuviria@gmail.com \
--cc=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).