From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9713 invoked from network); 14 Apr 2002 10:10:00 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Apr 2002 10:10:00 -0000 Received: (qmail 27528 invoked by alias); 14 Apr 2002 10:09:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16981 Received: (qmail 27517 invoked from network); 14 Apr 2002 10:09:53 -0000 From: Borsenkow Andrej To: Zsh hackers list Subject: _arguments description problem Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2-5mdk Date: 14 Apr 2002 14:09:43 +0400 Message-Id: <1018778989.3134.13.camel@localhost.localdomain> Mime-Version: 1.0 _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