From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3736 invoked from network); 13 Sep 1999 08:34:39 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Sep 1999 08:34:39 -0000 Received: (qmail 23449 invoked by alias); 13 Sep 1999 08:34:28 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7788 Received: (qmail 23442 invoked from network); 13 Sep 1999 08:34:28 -0000 Date: Mon, 13 Sep 1999 10:34:24 +0200 (MET DST) Message-Id: <199909130834.KAA05353@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Fri, 10 Sep 1999 19:54:47 +0400 Subject: Re: Completion listing of command options ( Re: Size of select listing?) Andrej Borsenkow wrote: > You can set option_prefix configuration key. In this case, options will be > generated only if anything else fails. This reduces list to "normal arguments" > completion. > > Still, I'd like to add handling of `--' as option terminator as well. We need > some way (option?) to tell _arguments, that `--' ends option list for this > command, so, that after `--' it won't try to complete command options any more. _arguments '--:*:all arguments after this one:' will make everything after a `--' be completed by `'. RTM. > You can make options and arguments be displayed in separate groups. It adds to > readability but does not make list size smaller. How should it. > About `-' display - it is currently needed to distinguish between option(s) and > argument(s). If you can make sure, that only options or only arguments are > displayed - it could be omitted. Why would you want it, I wonder. It's only a couple of characters after all and only very seldom will the omission of the `-'s make the list small enough to fit on the terminal if it didn't fit with the `-'s. > But, if you make a patch, do make it to use a configuration key :-) *Definitely*, yes. > Still, _arguments, even with option_prefix set, behaves funnily: > > patch TAB -> completes files. It's O.K. > patch foo TAB -> again files. Still O.K. > patch foo bar TAB - lists all options! But, patch can have only two arguments - > so, I'd expected some message about it. The fact that you only get options as possible matches even though you normally don't see them could be taken as a (strong) hint for that, couldn't it? However, it wouldn't be hard to add either `:no more arguments:' descriptions to the calls of `_arguments' or build this into `_arguments'. Bye Sven P.S.: Btw, _long_options is dead. -- Sven Wischnowsky wischnow@informatik.hu-berlin.de