summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Debian/Command/.distfiles1
-rw-r--r--Completion/Debian/Command/_vim-addons50
3 files changed, 56 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c1463978..837bf8d60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-06 Clint Adams <clint@zsh.org>
+
+ * Chris Lamb: 24365: Completion/Debian/Command/.distfiles,
+ Completion/Debian/Command/_vim-addons: completion for vim-addons.
+
2008-01-05 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 24362: Src/Zle/zle_refresh.c: redrawing line with multibyte
diff --git a/Completion/Debian/Command/.distfiles b/Completion/Debian/Command/.distfiles
index cad18bce5..a48997116 100644
--- a/Completion/Debian/Command/.distfiles
+++ b/Completion/Debian/Command/.distfiles
@@ -15,4 +15,5 @@ _mergechanges _module-assistant _piuparts
_reprepro _schroot _svn-buildpackage
_toolchain-source _update-alternatives _update-rc.d
_uscan _wajig _wanna-build
+_vim-addons
'
diff --git a/Completion/Debian/Command/_vim-addons b/Completion/Debian/Command/_vim-addons
new file mode 100644
index 000000000..dbd0ee31d
--- /dev/null
+++ b/Completion/Debian/Command/_vim-addons
@@ -0,0 +1,50 @@
+#compdef vim-addons
+
+local state line cmds 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
+
+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
+ ;;
+ amend)
+ _wanted addon expl 'addon' compadd $(command vim-addons -q | awk '$2 == "disabled" { print $1 }') && ret=0
+ ;;
+ remove)
+ _wanted addon expl 'addon' compadd $(command vim-addons -q | awk '$2 ~ /disabled|installed/ { print $1 }') && ret=0
+ ;;
+ files|status|disable|show)
+ _wanted addon expl 'addon' compadd $(command vim-addons list) && ret=0
+ ;;
+ esac
+ ;;
+esac
+
+return ret