From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27753 invoked from network); 25 Jul 2000 15:06:03 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Jul 2000 15:06:03 -0000 Received: (qmail 3086 invoked by alias); 25 Jul 2000 15:05:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12366 Received: (qmail 3079 invoked from network); 25 Jul 2000 15:05:49 -0000 From: "Bart Schaefer" Message-Id: <1000725150527.ZM19968@candle.brasslantern.com> Date: Tue, 25 Jul 2000 15:05:26 +0000 In-Reply-To: <200007240852.KAA05409@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: _arguments parsing of --help output" (Jul 24, 10:52am) References: <200007240852.KAA05409@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: Sven Wischnowsky , zsh-workers@sunsite.auc.dk Subject: Re: _arguments parsing of --help output MIME-Version: 1.0 X-UIDL: aa54bed0262b878975b5d2d3147b23f9 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 24, 10:52am, Sven Wischnowsky wrote: } Subject: Re: _arguments parsing of --help output } } Bart Schaefer wrote: } } > Many GNU commands include short options in the --help output as well } > [...] } > Is there a reason that we don't attempt to complete the short forms? } } _arguments '-e:ea:(1 2)' -e -b -p } } This will make `foo -e ' complete `1' and `2' but `foo -' lists } both (with auto-descriptions). I don't understand here what you mean by "`foo -' lists both". } The code in _arguments takes care that the user-supplied specs are } preferred over the automatically derived ones, though. Using the 3.1.9-dev-3 version of _arguments, I tried all of: _tst() { _arguments '--e:ea:(1 2)' -- } # Case 1 _tst() { _arguments -- '--e:ea:(1 2)' } # Case 2 _tst() { _arguments -- '*--e:ea:(1 2)' } # Case 3 In combination with: tst() { print -l - --e --b --p } compdef _tst tst Case 1: Completion after `tst' lists --e --b --p and completion after `tst --e' lists 1 2. Case 2: Completion after `tst' lists --e --b --p and completion after `tst --e' completes `--' and then lists --b and --p; 1 or 2 are never completed. Case 3: Exactly like Case 2. So case 1 behaves as I expected, and case 3 appears to be broken. (I also tried '*e:ea:(1 2)' and a few other patterns.) I'm not sure what I should be expecting from case 2. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net