From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4725 invoked from network); 9 Jan 2003 13:03:32 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 9 Jan 2003 13:03:32 -0000 Received: (qmail 21449 invoked by alias); 9 Jan 2003 13:03:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18062 Received: (qmail 21438 invoked from network); 9 Jan 2003 13:03:23 -0000 Message-ID: <6134254DE87BD411908B00A0C99B044F04D68E65@MOWD019A> From: Borzenkov Andrey To: "'zsh-workers@sunsite.dk'" Subject: Passsing descriptions down in completion functions Date: Thu, 9 Jan 2003 16:17:07 +0300 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain Either I do not understand something basic or it does not work (and probably has never working really). Simple example. bor@itsrm2% functions _foo _foo () { _arguments -s "-p[some option]:argument for this option:_hosts" } bor@itsrm2% compdef _foo foo bor@itsrm2% foo -p TAB bor@itsrm2% foo -p D248H032 Completing host ^^^^ should it not be "argument for that option"? D248H032 GH4090Y0 anyhost ... It is clear what happens: +_arguments:340> _hosts -J option-p-1 -X '%BCompleting argument for this option%b' this sounds good, but later on ... +_all_labels:37> compadd -J hosts -X '%BCompleting host%b' -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' -J option-p-1 -X '%BCompleting argument for this option%b' -a hosts Oops, description is now lost. Quoting documentation: If the ACTION starts with a space, this list of words will be invoked unchanged, otherwise it will be invoked with some extra strings placed after the first word which can be given as arguments to the compadd builtin command and which make sure that the MESSAGE given in the description will be shown above the matches. So, is it a bug or not? -andrej