about summary refs log tree commit diff
path: root/Completion/Debian
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-01-15 09:11:31 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-01-15 09:11:31 +0000
commitca585f812b02071cc261fb9dbe463bab6f8be602 (patch)
treee90c1af1169132098b62207ced35fdf83607e910 /Completion/Debian
parenta11115ecee1b5fc02b4b714561ffdbc2d2a3e622 (diff)
downloadzsh-ca585f812b02071cc261fb9dbe463bab6f8be602.tar.gz
zsh-ca585f812b02071cc261fb9dbe463bab6f8be602.tar.xz
zsh-ca585f812b02071cc261fb9dbe463bab6f8be602.zip
add `services', allowing easier re-use of (parts of) completion functions (13346)
Diffstat (limited to 'Completion/Debian')
-rw-r--r--Completion/Debian/_apt4
-rw-r--r--Completion/Debian/_bug2
-rw-r--r--Completion/Debian/_dpkg2
3 files changed, 4 insertions, 4 deletions
diff --git a/Completion/Debian/_apt b/Completion/Debian/_apt
index 74d2dceca..62a38c0a3 100644
--- a/Completion/Debian/_apt
+++ b/Completion/Debian/_apt
@@ -1,12 +1,12 @@
 #compdef apt-get apt-cache apt-cdrom apt-config
 
 _apt () {
-  case "${words[1]:t}" in
+  case "$service" in
     apt-get) _apt-get "$@";;
     apt-cache) _apt-cache "$@";;
     apt-cdrom) _apt-cdrom "$@";;
     apt-config) _apt-config "$@";;
-    *) _message "unknown command $words[1]";;
+    *) _message "unknown command $service";;
   esac
 }
 
diff --git a/Completion/Debian/_bug b/Completion/Debian/_bug
index 1c67103e0..30993203f 100644
--- a/Completion/Debian/_bug
+++ b/Completion/Debian/_bug
@@ -18,7 +18,7 @@ _rb_commonargs=('(--bts)-B[use alternate BTS]:system:(debian gnome kde tdyc kde-
 	   '(--http_proxy)--proxy=:proxyhost:_hosts' \
 	   '(--proxy)--http_proxy=:proxyhost:_hosts')
 
-case "${words[1]:t}" in
+case "$service" in
 bug)
 _arguments '-c[exclude configs from report]' \
            '-f[argument is a file, not a package]' \
diff --git a/Completion/Debian/_dpkg b/Completion/Debian/_dpkg
index 90313b39a..ca6fdf783 100644
--- a/Completion/Debian/_dpkg
+++ b/Completion/Debian/_dpkg
@@ -86,7 +86,7 @@ _dpkg_options_recursive=('(--recursive)-R[recursive]' '(-R)--recursive')
 #  _dpkg_actions_install=('(--install)-i[install]' '(-i)--install')
 #  _dpkg_actions_record_avail=('(--record-avail)-A[record available]' '(-A)--record-avail')
 
-case "${words[1]:t}" in
+case "$service" in
 dpkg)
 _arguments -C -s "$_dpkg_actions[@]" \
            "$_dpkg_deb_actions[@]" \