From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6302 invoked from network); 13 Sep 1999 12:25:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Sep 1999 12:25:24 -0000 Received: (qmail 9781 invoked by alias); 13 Sep 1999 12:25:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7802 Received: (qmail 9774 invoked from network); 13 Sep 1999 12:25:05 -0000 Date: Mon, 13 Sep 1999 14:25:03 +0200 (MET DST) Message-Id: <199909131225.OAA21121@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Thu, 9 Sep 1999 19:38:51 +0400 Subject: Re: Option description and _oldlist Andrej Borsenkow wrote: > bor@itsrm2:/tools/src/ntp-4.0.97f%> zsh -f > itsrm2% autoload compinit; compinit > itsrm2% compconf group_matches=yes message_format='%d' description_format='%d' d > escribe_options=yes > itsrm2% xterm -f > option > -fb -fi -font > -fg -fn -foreground > > As I understand, the description is expected on the status line? When I move > from option to option in menu completion? (Maybe this is clear already, I just wanted to mention the thing below...) No, they are displayed with the matches. ...interesting idea, however. > And one more strange thing (assuming the zsh from above): > > itsrm2% zmodload complist > itsrm2% SELECTMIN=0 > itsrm2% compconf completer=_oldlist:_complete > itsrm2% patch --s ... till you get > > itsrm2% patch --suffix= > option > --set-time --set-utc --strip --suffix > > ENTER -> --suffix is not highlighted > TAB -> > > itsrm2% patch --set-time > option > > TAB -> > > itsrm2% patch --set-utc > option > --set-time --set-utc --strip --suffix (...this one.) This is one of the things I dislike about the behavior of `_arguments -s': to be able to display the prefix character and still complete single letter options, we have to use display lists whenever `-s' is used. It's just that in cases like this one you simply don't see that it's a display list -- looking like a normal list of matches. Since I really don't want to list options without the prefix character (I could live with a config key turning that on/off, of course), we would need something else here. Which brings me back to thinking about a (set of) option(s) for `compadd' that allows us to give display strings per match. With such display strings we could use menu-selection (but we can't use menu-selection with the display lists we have now, because the completion code can't find out if there is a one-to-one correspondence between the elements of the display list and the matches, so it doesn't know which one to highlight). Implementing display strings is probably not too hard. Maybe we could even have different types: strings that should be listed in columns, strings that should be listed one per line. Probably strings in which the `%'-escapes are interpreted (and other types of strings where they aren't). It would be nice to use them throughout the completion functions, then (in the functions using `ps' this would probably be a bit hairy, but I think still implemntable). In another message: > 3.1.6-pws-3 with patches up to 7750 > > bor@itsrm2:/tools/src/zsh-3.1.6-pws-3%> zsh -f > itsrm2% autoload compinit > itsrm2% compinit -D > itsrm2% bindkey -e > itsrm2% ./configure --pre=/toTAB > itsrm2% ./configure --prefix=/toTAB > B-e-e-p > > itsrm2% ls -d /to* > /tools I hope this is now solved, too. At least it works for me. And in yet-another-message: > In my case `patch --in=/' does not work either. > > bor@itsrm2:~%> zsh -f > itsrm2% autoload compinit; compinit -D > itsrm2% patch --in=/ > itsrm2% patch --input=/ > B-e-e-p > > This is 3.1.6-pws-3 with patches up to 7750 > > Note that both --dir or --output work; even `-i TAB' works as expected. Can't help here either. My `patch' doesn't support `--input' and for all other options it works. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de