about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-15 15:08:24 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-15 15:08:24 +0000
commitd158824284f0ff13b5de0189b3e429d5fb9eab63 (patch)
treec52959fdff73b3b52003fd7dfd0d1dba6f113e44
parent163aad3457a0f10a6f0bff654fd324abb5c2918c (diff)
downloadzsh-d158824284f0ff13b5de0189b3e429d5fb9eab63.tar.gz
zsh-d158824284f0ff13b5de0189b3e429d5fb9eab63.tar.xz
zsh-d158824284f0ff13b5de0189b3e429d5fb9eab63.zip
zsh-workers/8289
-rw-r--r--Completion/Base/_regex_arguments7
-rw-r--r--Completion/Debian/_apt2
2 files changed, 4 insertions, 5 deletions
diff --git a/Completion/Base/_regex_arguments b/Completion/Base/_regex_arguments
index a89bb19b4..2608fda11 100644
--- a/Completion/Base/_regex_arguments
+++ b/Completion/Base/_regex_arguments
@@ -88,8 +88,6 @@ _ra_parse_elt () {
 	  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 @@ _ra_gen_func () {
 	'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 - \
diff --git a/Completion/Debian/_apt b/Completion/Debian/_apt
index 503d42a56..e4593d54e 100644
--- a/Completion/Debian/_apt
+++ b/Completion/Debian/_apt
@@ -284,7 +284,7 @@ _describe -o option tmp2 -- tmp3 -S='
     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" \) \|