Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _arguments parsing of --help output
- X-seq: zsh-workers 12350
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: _arguments parsing of --help output
- Date: Mon, 24 Jul 2000 10:52:58 +0200 (MET DST)
- In-reply-to: "Bart Schaefer"'s message of Fri, 21 Jul 2000 15:22:33 -0700
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bart Schaefer wrote:
> Many GNU commands include short options in the --help output as well as long
> ones; e.g. `tar --help' emits lines like "-m, --modifcation-time ...". The
> code in _arguments accounts for this by splitting the line at commas, but
> then discards the short form of the option.
>
> Is there a reason that we don't attempt to complete the short forms as well?
The only problem I can see is if the user-supplied specs contain those
options, too. Currently _arguments does not discard additional
definitions but the first one takes precedence with respect to
argument handling (arguments of options):
_arguments '-e:ea:(1 2)' -e -b -p
This will make `foo -e <TAB>' complete `1' and `2' but `foo -' lists
both (with auto-descriptions).
Hm, maybe we should do something about that.
The code in _arguments takes care that the user-supplied specs are
preferred over the automatically derived ones, though.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author