From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11373 invoked from network); 23 Nov 1999 18:22:42 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Nov 1999 18:22:42 -0000 Received: (qmail 10790 invoked by alias); 23 Nov 1999 18:22:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8759 Received: (qmail 10783 invoked from network); 23 Nov 1999 18:22:37 -0000 Date: Tue, 23 Nov 1999 18:22:19 +0000 From: Adam Spiers To: zsh-workers@sunsite.auc.dk Subject: Re: "getopts" bugs and bad interactions with "shift" Message-ID: <19991123182219.A7795@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh-workers@sunsite.auc.dk References: <991123180832.ZM29676@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: <991123180832.ZM29676@candle.brasslantern.com> X-URL: http://www.new.ox.ac.uk/~adam/ X-OS: Linux 2.2.12 i686 Bart Schaefer (schaefer@candle.brasslantern.com) wrote: > Question: Is "getopts" based on some standard or emulated behavior of > some other shell, or is it strictly a zsh thing? getopt is part of GNU libc, and according to the info pages: `getopt' is more standard [than argp_parse] (the short-option only version of it is a part of the POSIX standard), Virtually all GNU utilities use it. Also, Perl has the Getopt::{Std,Long} modules which emulates it precisely, AFAIK. A `man 3 getopt' on my RedHat box confirms what I suspected, which is that there is only one optstring parameter. It also mumbles stuff about POSIX being broken ...