From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 752 invoked from network); 17 Apr 2005 13:37:43 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 17 Apr 2005 13:37:43 -0000 Received: (qmail 48828 invoked from network); 17 Apr 2005 13:37:37 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Apr 2005 13:37:37 -0000 Received: (qmail 22751 invoked by alias); 17 Apr 2005 13:37:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21150 Received: (qmail 22740 invoked from network); 17 Apr 2005 13:37:33 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 17 Apr 2005 13:37:33 -0000 Received: (qmail 48560 invoked from network); 17 Apr 2005 13:37:33 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 17 Apr 2005 13:37:29 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 32D3E7001A; Sun, 17 Apr 2005 09:37:27 -0400 (EDT) Date: Sun, 17 Apr 2005 09:37:27 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Subject: PATCH: _baz, _tla Message-ID: <20050417133727.GA27005@scowler.net> Mail-Followup-To: zsh-workers@sunsite.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 The "shift 6 input" leads to trouble with help output inconsistencies, so it's better to strip out -h, -H, and -V in the for loop. Index: Completion/Unix/Command/_baz =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_baz,v retrieving revision 1.5 diff -u -r1.5 _baz --- Completion/Unix/Command/_baz 16 Apr 2005 20:22:47 -0000 1.5 +++ Completion/Unix/Command/_baz 17 Apr 2005 13:33:24 -0000 @@ -490,8 +490,7 @@ arguments=() local input - input=(${${(f)"$($BAZ $cmd -h)"}# }) - shift 6 input + input=(${${(M)${(f)"$($BAZ $cmd -h)"}:# *}# }) local i j=1 local short long arg desc action @@ -513,6 +512,7 @@ (( i++ )) desc[j]="$desc[j] ${input[i]##* }" fi + [[ "$short[j]" == -[hHV] ]] && continue desc[j]="${${desc[j]//\[/\\[}//\]/\\]}" # escape brackets case $arg[j] in Index: Completion/Unix/Command/_tla =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_tla,v retrieving revision 1.5 diff -u -r1.5 _tla --- Completion/Unix/Command/_tla 16 Apr 2005 20:22:47 -0000 1.5 +++ Completion/Unix/Command/_tla 17 Apr 2005 13:33:25 -0000 @@ -527,8 +527,7 @@ arguments=() local input - input=(${${(f)"$($TLA $cmd -h)"}# }) - shift 6 input + input=(${${(M)${(f)"$($TLA $cmd -h)"}:# *}# }) local i j=1 local short long arg desc action @@ -550,6 +549,7 @@ (( i++ )) desc[j]="$desc[j] ${input[i]##* }" fi + [[ "$short[j]" == -[hHV] ]] && continue desc[j]="${${desc[j]//\[/\\[}//\]/\\]}" # escape brackets case $arg[j] in