From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1024 invoked from network); 10 Sep 1999 16:20:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Sep 1999 16:20:10 -0000 Received: (qmail 2734 invoked by alias); 10 Sep 1999 16:19:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7774 Received: (qmail 2727 invoked from network); 10 Sep 1999 16:19:54 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: Problem with _arguments and _normal as action if nolistambiguous is set. Date: Fri, 10 Sep 1999 20:19:48 +0400 Message-ID: <001001befba8$4d7eb6a0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <000b01befb8f$9f2f87e0$21c9ca95@mow.siemens.ru> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 With the sudo completion as below, I get very funny results. It does not happen if I use _files as action instead of _normal. The arguments itself are completed correctly (that is, command name and parameters), but sudo -TAB is at least strange. Again, it is 3.1.6-pws-3 with patches up to 7750 bor@itsrm2:~/.zsh.d/completion%> zsh -f itsrm2% autoload compinit itsrm2% fpath=($fpath ~/.zsh.d/completion) itsrm2% compinit -D itsrm2% setopt nolistambiguous itsrm2% compconf describe_options=yes itsrm2% sudo -TAB itsrm2% sudo <=cursor here - -H -- set HOME environment variable -V -- show version -b -- run command in background -h -- show help -k -- remove timestamp file -l -- list commands -s -- run SHELL -v -- validate timestamp file -p -r -u TAB once more itsrm2% sudo !<=cursor - -H -- set HOME environment variable -V -- show version -b -- run command in background -h -- show help -k -- remove timestamp file -l -- list commands -s -- run SHELL -v -- validate timestamp file -p -r -u TAB once more itsrm2% sudo !!<=cursor - -H -- set HOME environment variable -V -- show version -b -- run command in background -h -- show help -k -- remove timestamp file -l -- list commands -s -- run SHELL -v -- validate timestamp file -p -r -u Here is half-hearted example of sudo completion: > > _arguments \ > '-V[show version]' \ > '-l[list commands]' \ > '-h[show help]' \ > '-v[validate timestamp file]' \ > '-k[remove timestamp file]' \ > '-b[run command in background]' \ > '-r:Kerberos realm:' \ > '-p:prompt:' \ > '-u:user name:_users' \ > '-s[run SHELL]' \ > '-H[set HOME environment variable]' \ > '*::complete command and/or arguments:_normal' > /andrej