summaryrefslogtreecommitdiff
path: root/Completion/Debian/Command/_vim-addons
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Debian/Command/_vim-addons')
-rw-r--r--Completion/Debian/Command/_vim-addons65
1 files changed, 33 insertions, 32 deletions
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
;;