zsh-workers
 help / color / mirror / code / Atom feed
* Silly questions about _arguments & Co (and probably bugs)
@ 1999-09-09 13:13 Andrej Borsenkow
  1999-09-09 13:54 ` Tanaka Akira
  0 siblings, 1 reply; 9+ messages in thread
From: Andrej Borsenkow @ 1999-09-09 13:13 UTC (permalink / raw)
  To: ZSH workers mailing list

Forgive me, but I recently had no time to follow all discussions and do not
quite understand the manual description.

1. When are the description of arguments actually printed? I tried some basic
commands like xterm or patch but descriptions do not seem to be printed.

2. Looks, like `-s' is overloaded - it is used both for "single letter options"
and for "option aliases" (from _long_options). I believe, this is the reason why
option aliases do not work any more :-) E.g. ntpd configure lists only --enable
variant - and now no --disable counterparts are recognised.

3. I cannot make completion for patch work. As simple as `patch --sTAB' just
beeps.

4. `patch -pTAB' gives me `patch -p0 ' - but `0' is not autoremoved if I enter
different number (I'd expect it to be).

5. `patch TAB' does not list most of the long options at all. Actually, it is
interesting case - if a command has both long and short form - which one should
be preferred? I'd like to have short option only if no corresponding short one
exists.

TIA

/andrej


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Option description and _oldlist
@ 1999-09-13 12:25 Sven Wischnowsky
  0 siblings, 0 replies; 9+ messages in thread
From: Sven Wischnowsky @ 1999-09-13 12:25 UTC (permalink / raw)
  To: zsh-workers


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<TAB><TAB>
> 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<TAB> ... 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=/<TAB>
> itsrm2% patch --input=/<TAB>
> 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1999-09-13 12:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-09 13:13 Silly questions about _arguments & Co (and probably bugs) Andrej Borsenkow
1999-09-09 13:54 ` Tanaka Akira
1999-09-09 14:26   ` Andrej Borsenkow
1999-09-09 14:32     ` Tanaka Akira
1999-09-09 14:34       ` Andrej Borsenkow
1999-09-09 14:45         ` Tanaka Akira
1999-09-09 15:02           ` Andrej Borsenkow
1999-09-09 15:38   ` Option description and _oldlist Andrej Borsenkow
1999-09-13 12:25 Sven Wischnowsky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).