about summary refs log tree commit diff
path: root/Completion/Debian/_apt
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Debian/_apt')
-rw-r--r--Completion/Debian/_apt21
1 files changed, 11 insertions, 10 deletions
diff --git a/Completion/Debian/_apt b/Completion/Debian/_apt
index 9a109fdb6..f4e35fe32 100644
--- a/Completion/Debian/_apt
+++ b/Completion/Debian/_apt
@@ -50,9 +50,8 @@ _apt_arguments () {
   # skip --
   [[ 0 -lt $# ]] && shift
 
-  comp_hasarg="\
-  case \$current_option in
-  ${comp_hasarg}esac"
+  comp_hasarg="{case \$current_option in
+  ${comp_hasarg}esac}"
 
   local short_seq false true bool bool_prefix intlevel word word1 nul qnul
   local comp_bool comp_intlevel comp_configfile comp_arbitem comp_long comp_opt
@@ -75,13 +74,13 @@ _apt_arguments () {
   nul=$'\0'
   qnul="\$'\\0'"
 
-  comp_bool='compadd "$expl[@]" '"$bool"
-  comp_intlevel= #"_message 'intlevel'"
-  comp_configfile='_files "$expl[@]"'
-  comp_arbitem= #"_message 'Foo::Bar=bar'"
+  comp_bool="($bool)"
+  comp_intlevel=
+  comp_configfile='_files'
+  comp_arbitem=
 
   comp_short=\
-'if [[ $PREFIX = -'"$short_seq"' ]]; then
+'{if [[ $PREFIX = -'"$short_seq"' ]]; then
   _apt_consume_short ${PREFIX[2,-1]}
   tmp1=(${(M)${(s:,:)${(kj:,:)num_options[(R)*~0]}}:#-?})
   tmp2=(${PREFIX}${^tmp1#-})
@@ -89,7 +88,7 @@ _apt_arguments () {
 elif [[ -z "$PREFIX" ]]; then
   tmp1=(${(M)${(s:,:)${(kj:,:)num_options[(R)*~0]}}:#-?})
   _describe -o option tmp1
-fi'
+fi}'
 
   comp_long=\
 'tmp1="${(j:|:)${(@)${(@M)${(@s:,:)${(@kj:,:)num_options[(R)*~0]}}:#--*}#--}}"
@@ -106,7 +105,9 @@ tmp2=("$tmp2[@]" $_ra_left${(M)^short_bool:#$~tmp1} $_ra_left${(M)^short_intleve
 tmp3=("$tmp3[@]" $_ra_left${(M)^short_hasarg:#$~tmp1} $_ra_left${(M)^short_configfile:#$~tmp1} $_ra_left${(M)^short_arbitem:#$~tmp1})
 _describe -o option tmp2 -- tmp3 -S='
 
-  comp_opt='{ ! zstyle -T ":completion:${curcontext}:options" prefix-needed || [[ "$PREFIX" = -* ]] }'" && { $comp_short; $comp_long }"
+  comp_opt='{{ ! zstyle -T ":completion:${curcontext}:options" prefix-needed || [[ "$PREFIX" = -* ]] }'" && { $comp_short; $comp_long }}"
+  comp_short="{$comp_short}"
+  comp_long="{$comp_long}"
 
   regex_short=()
   regex_long=()