zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@fysh.org>
To: schaefer@candle.brasslantern.com (Bart Schaefer)
Cc: zsh-workers@sunsite.auc.dk
Subject: Re: "getopts" bugs and bad interactions with "shift"
Date: Tue, 23 Nov 1999 20:36:06 +0000 (GMT)	[thread overview]
Message-ID: <E11qMfW-0004Bu-00@crucigera.fysh.org> (raw)
In-Reply-To: <991123180832.ZM29676@candle.brasslantern.com> from Bart Schaefer at "Nov 23, 1999  6: 8:32 pm"

Bart Schaefer wrote:
>Question:  Is "getopts" based on some standard or emulated behavior of
>some other shell, or is it strictly a zsh thing?

It's in POSIX.2.  My rewrite was an attempt to directly implement
the text of the standard.  (I no longer have access to the standard,
unfortunately.)  As you can tell from the code, the standard definition
is pretty unpleasant.  There are places where it's not clear what state
is stored in parameters and what is supposed to be hidden, and the text
doesn't address the issue of multiple consecutive uses of getopts at all.
I wouldn't be surprised if there are actually bugs in the standard.

-zefram


  parent reply	other threads:[~1999-11-23 20:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-23 18:08 Bart Schaefer
1999-11-23 18:22 ` Adam Spiers
1999-11-23 21:40   ` Bart Schaefer
1999-11-23 22:17     ` zsh 3.0.7 hogs memory James Kirkpatrick
1999-11-24  5:35       ` Bart Schaefer
1999-11-24 16:25         ` James Kirkpatrick
1999-11-30 15:42         ` James Kirkpatrick
1999-11-30 16:03           ` Bart Schaefer
1999-11-23 20:36 ` Zefram [this message]
1999-11-24 11:50 "getopts" bugs and bad interactions with "shift" Sven Wischnowsky
1999-11-24 17:44 ` 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=E11qMfW-0004Bu-00@crucigera.fysh.org \
    --to=zefram@fysh.org \
    --cc=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.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).