summaryrefslogtreecommitdiff
path: root/Completion/Debian/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Debian/Command')
-rw-r--r--Completion/Debian/Command/_dchroot8
-rw-r--r--Completion/Debian/Command/_dchroot-dsa8
-rw-r--r--Completion/Debian/Command/_make-kpkg6
-rw-r--r--Completion/Debian/Command/_update-alternatives2
-rw-r--r--Completion/Debian/Command/_vim-addons65
5 files changed, 45 insertions, 44 deletions
diff --git a/Completion/Debian/Command/_dchroot b/Completion/Debian/Command/_dchroot
index 43a797d83..c26e5691a 100644
--- a/Completion/Debian/Command/_dchroot
+++ b/Completion/Debian/Command/_dchroot
@@ -20,8 +20,8 @@ _arguments -S \
'*::arguments: _normal' && return 0
case "$state" in
- (chroot)
- _wanted tag expl 'chroot' \
- compadd ${(os:,:)${${${"$(dchroot -l )"#*: }// /}//[[\]]/,}}
- ;;
+ chroot)
+ _wanted -C $context chroots expl 'chroot' \
+ compadd ${(os:,:)${${${"$(_call_program chroots dchroot -l )"#*: }// /}//[[\]]/,}}
+ ;;
esac
diff --git a/Completion/Debian/Command/_dchroot-dsa b/Completion/Debian/Command/_dchroot-dsa
index bed4bcf19..d4668b553 100644
--- a/Completion/Debian/Command/_dchroot-dsa
+++ b/Completion/Debian/Command/_dchroot-dsa
@@ -19,8 +19,8 @@ _arguments -S \
'*::arguments: _normal' && return 0
case "$state" in
- (chroot)
- _wanted tag expl 'chroot' \
- compadd ${(os:,:)${${${"$(dchroot -l )"#*: }// /}//[[\]]/,}}
- ;;
+ chroot)
+ _wanted -C $context chroots expl 'chroot' \
+ compadd ${(os:,:)${${${"$(_call_program chroots dchroot -l )"#*: }// /}//[[\]]/,}}
+ ;;
esac
diff --git a/Completion/Debian/Command/_make-kpkg b/Completion/Debian/Command/_make-kpkg
index c079d9aa0..55adf882f 100644
--- a/Completion/Debian/Command/_make-kpkg
+++ b/Completion/Debian/Command/_make-kpkg
@@ -1,9 +1,9 @@
#compdef make-kpkg
-local context state line
+local curcontext="$curcontext" state line
typeset -A opt_args
-_arguments \
+_arguments -C \
'--help[display help message]' \
'--revision[change Debian revision number]:number:' \
'--append-to-version[specify additional kernel sub-version]:suffix:' \
@@ -45,7 +45,7 @@ _arguments \
configure\:"configure the kernel" \
debian\:"creates the debian/ directory" \
libc-kheaders\:"create the kernel headers package needed by libc" \
- ))' && return 0
+ ))' && return
case "$state" in
(addedmodules)
diff --git a/Completion/Debian/Command/_update-alternatives b/Completion/Debian/Command/_update-alternatives
index ccf5084bf..31128dd82 100644
--- a/Completion/Debian/Command/_update-alternatives
+++ b/Completion/Debian/Command/_update-alternatives
@@ -1,6 +1,6 @@
#compdef update-alternatives
-local curcontext="$curcontext" context state line alterdir
+local curcontext="$curcontext" state line alterdir ret
if [[ -d /var/lib/dpkg/alternatives ]]; then
alterdir=/var/lib/dpkg/alternatives
diff --git a/Completion/Debian/Command/_vim-addons b/Completion/Debian/Command/_vim-addons
index dbd0ee31d..0ad39955d 100644
--- a/Completion/Debian/Command/_vim-addons
+++ b/Completion/Debian/Command/_vim-addons
@@ -1,47 +1,48 @@
#compdef vim-addons
-local state line cmds ret=1
+local context state line expl ret=1
typeset -A opt_args
-_arguments -C \
- {-q,--query}'[be quiet and make the output more parseable]' \
- {-r,--registry-dir}'[set the registry directory]' \
- {-s,--source-dir}'[set addon source directory]' \
- {-t,--target-dir}'[set addon target directory]' \
- {-v,--verbose}'[increase verbosity]' \
- {-y,--system-dir}'[set system-wide target directory]' \
- {-h,--help}'[help]' \
- {-w,--system-wide}'[set target directory to the system-wide one (overrides -t)]' \
- '1: :->cmds' \
- '*: :->args' && ret=0
-
+_arguments \
+ '(-q --query)'{-q,--query}'[be quiet and make the output more parseable]' \
+ '(-r --registry-dir)'{-r,--registry-dir}'[set the registry directory]' \
+ '(-s --source-dir)'{-s,--source-dir}'[set addon source directory]' \
+ '(-t --target-dir -w --system-wide)'{-t,--target-dir}'[set addon target directory]' \
+ '(-v --verbose -z --silent)'{-v,--verbose}'[increase verbosity]' \
+ '(y --system-dir)'{-y,--system-dir}'[set system-wide target directory]' \
+ '(-)'{-h,--help}'[show help information]' \
+ '(-w --system-wide -t --target-dir)'{-w,--system-wide}'[use system-wide target directory]' \
+ '(-z --silent -v --verbose)'{-z,--silent}'[supress most output]' \
+ '1:commands:((
+ install\:install\ specified\ addons
+ remove\:remove\ specified\ addons
+ list\:list\ available\ addons\ in\ registry
+ status\:list\ status\ of\ addons
+ disable\:disable\ specified\ addons
+ enable\:undo\ effects\ of\ previous\ disable
+ files\:list\ files\ composing\ the\ specified\ addon
+ show\:display\ detailed\ information\ on\ specified\ addon
+ ))' \
+ '*: :->args' && ret=0
+
case $state in
- cmds)
- cmds=(
- 'install:install the specified addon'
- 'remove:remove the specified addon'
- 'list:list available addons in registry'
- 'status:list the status of addons'
- 'disable:disable the specified addons'
- 'amend:under the effects of the previous disable'
- 'files:list the files composing the specified addon'
- 'show:display detailed information about the specified addon'
- )
- _describe -t commands 'vim-addons command' cmds && ret=0
- ;;
args)
case $line[1] in
install)
- _wanted addon expl 'addon' compadd $(command vim-addons -q | awk '$2 == "removed" { print $1 }') && ret=0
+ _wanted -C $context addons expl 'addon' compadd - \
+ ${${(M)${(f)"$(_call_program addons vim-addons -q)"}:#*removed}%$'\t'*} && ret=0
;;
- amend)
- _wanted addon expl 'addon' compadd $(command vim-addons -q | awk '$2 == "disabled" { print $1 }') && ret=0
+ enable)
+ _wanted -C $context addons expl 'addon' compadd - \
+ ${${(M)${(f)"$(_call_program addons vim-addons -q)"}:#*disabled}%$'\t'*} && ret=0
;;
remove)
- _wanted addon expl 'addon' compadd $(command vim-addons -q | awk '$2 ~ /disabled|installed/ { print $1 }') && ret=0
+ _wanted -C $context addons expl 'addon' compadd - \
+ ${${(M)${(f)"$(_call_program addons vim-addons -q)"}:#*(disabled|installed)}%$'\t'*} && ret=0
;;
- files|status|disable|show)
- _wanted addon expl 'addon' compadd $(command vim-addons list) && ret=0
+ *)
+ _wanted -C $context addons expl 'addon' compadd - \
+ $(_call_program addons vim-addons list) && ret=0
;;
esac
;;