Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] getopts OPTIND
- X-seq: zsh-workers 42251
- From: dana <dana@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: [BUG] getopts OPTIND
- Date: Tue, 9 Jan 2018 17:58:14 -0600
- Cc: franciscodezuviria@xxxxxxxxx, "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rzNQ1XYq+bpQwj4IuM98LM5SMV3raFLRtl0atSyhfUk=; b=HixGd8VCXXvUT4xD1z9YgBpzKt6XnirrQKRpQ1YgQaRjHdgQcQ6zkSW1VfRE2wus82 WSscMHv8hriYqU9YeTcufcLs1SCnZ1mAKnMc0c6I8OVUuMtIiJbNl4/hxlmmemFphn1C d9Cir+daJZPN31C794oS0NmXnRioe9FNFmsgu4uhzKSCvQh7ximCgz6AkQR9f3HylIj1 vsJC90yK39bLPEz2BT7oM0RtniQKMlToIPBkv/+v+ty5skwmuqMij8qPafQ1Ba88loy3 w6JrdW5yfPInd6VIS2+n0yd+c1ZdDlexpnYV8ipkcZR7uU1FVEkv9Iqv+pv4N3kun7qI ZGfA==
- In-reply-to: <CAH+w=7ZxSjSzrhgCWoRTPz+edFzGeODWMQPrYpMnbp26HSebsQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CA++-COw=KgUBJc1PMq=L5be2VeJGXBjwtsRfRx7+7GSMspcQJQ@mail.gmail.com> <0877C4E8-4CA3-453F-A16B-99E576F60E8D@dana.is> <CAH+w=7ZxSjSzrhgCWoRTPz+edFzGeODWMQPrYpMnbp26HSebsQ@mail.gmail.com>
On 9 Jan 2018, at 16:57, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author