From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26587 invoked from network); 15 Oct 1999 15:07:31 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Oct 1999 15:07:31 -0000 Received: (qmail 18195 invoked by alias); 15 Oct 1999 15:07:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8289 Received: (qmail 18183 invoked from network); 15 Oct 1999 15:07:25 -0000 To: zsh-workers@sunsite.auc.dk Subject: PATCH: _regex_arguments and _apt MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 16 Oct 1999 00:07:22 +0900 Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) I modified _regex_arguments and _apt. * Fix typo. * Remove obsolete comments. * Don't produce a case branch which has no code. Index: Completion/Base/_regex_arguments =================================================================== RCS file: /projects/zsh/zsh/Completion/Base/_regex_arguments,v retrieving revision 1.1.1.5 diff -u -F^( -r1.1.1.5 _regex_arguments --- Completion/Base/_regex_arguments 1999/09/25 11:12:08 1.1.1.5 +++ Completion/Base/_regex_arguments 1999/10/15 15:03:47 @@ -88,8 +88,6 @@ if [[ $index -le $#regex && $regex[index] = :* ]]; then act="${regex[index++][2,-1]}" action[$state]="$act" - # `actions[$act]="${actions[$act]} $state"' is not work properly - # because $act on lhs is expanded twice. : ${actions[$act]::="${actions[$act]} $state"} else action[$state]="" @@ -235,8 +233,9 @@ 'case "$_ra_actions[1]" in' for tmp in "${(@k)actions}"; do - #print -lr - "KEY:{$tmp}" "VAL:{$actions[$tmp]}" >&2 - print -lr - "${(j:);&:)${=actions[$tmp]}})" $tmp ';;' + if [[ "$tmp" != '' ]]; then + print -lr - "${(j:);&:)${=actions[$tmp]}})" $tmp ';;' + fi done print -lr - \ Index: Completion/Debian/_apt =================================================================== RCS file: /projects/zsh/zsh/Completion/Debian/_apt,v retrieving revision 1.1.1.8 diff -u -F^( -r1.1.1.8 _apt --- Completion/Debian/_apt 1999/09/25 11:12:10 1.1.1.8 +++ Completion/Debian/_apt 1999/10/15 15:03:47 @@ -284,7 +284,7 @@ regex_long_prefix=("$regex_long_prefix[@]" /"(${(j:|:)long_arbitem})$nul"/ -'_apt_consume_long ${match[1]%'$qnul'}' - /"$word"/ :"$comp_arbitem"/ \| + /"$word"/ :"$comp_arbitem" \| /"(${(j:|:)long_arbitem})="/ -'_apt_consume_long ${match[1]%=}' \( /"$word1"/ :"$comp_arbitem" \| /"$nul"/ /"$word"/ :"$comp_arbitem" \) \| -- Tanaka Akira