zsh-workers
 help / color / mirror / code / Atom feed
* _arguments description problem
@ 2002-04-14 10:09 Borsenkow Andrej
  2002-04-15  7:54 ` Sven Wischnowsky
  0 siblings, 1 reply; 4+ messages in thread
From: Borsenkow Andrej @ 2002-04-14 10:09 UTC (permalink / raw)
  To: Zsh hackers list

_arguments documentation suggests that description given in
option/argument specification is shown when values are completed. In
most cases they are not. The simple reason is, many "low-level"
functions that are called out of _arguments finally end up with
something like (_users):

_wanted users expl user compadd "$@" -k userdirs

and _wanted in effect overrides any arguments given to _users. It means,
that whatever top-level _arguments call specifies, _any_ call to _users
will show description "user" and not description given to _arguments.
Easy to see in smbclient - 

'(2)-U+[specify username]:username:_users'
                          ^^^^^^^^

but{pts/0}% smbclient -U adm
Completing user
           ^^^^
adm          dnscache     httpd-naat   operator     root         tinydns

Which means that _wanted (and related functions) probably needs some way
to know if it needs to setup description or not. I wonder, does it make
sense to parse arguments (in this case "$@" -k userdirs) and if standard
completion options are already there, do not override them? Seems like
the least intrusive solution.

-andrej


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

end of thread, other threads:[~2002-04-15  8:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-14 10:09 _arguments description problem Borsenkow Andrej
2002-04-15  7:54 ` Sven Wischnowsky
2002-04-15  8:36   ` Borsenkow Andrej
2002-04-15  8:51     ` 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).