summaryrefslogtreecommitdiff
path: root/Completion/Debian/Command
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:32:59 +0200
committerAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:58:59 +0200
commitdb38e167634b6c2217eec3a5aafc37c46d9e5a8d (patch)
treedaa342d423febbd3a5a7ef97053037677fab004a /Completion/Debian/Command
parent01eea47617a6e06debdb4330f92ae69f92089fd2 (diff)
parent3c3c8d3d13fd4cf6c03f81ca8dc18a1efd561728 (diff)
downloadzsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.tar.gz
zsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.zip
Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/Debian/Command')
-rw-r--r--Completion/Debian/Command/_apt1
-rw-r--r--Completion/Debian/Command/_apt-file100
-rw-r--r--Completion/Debian/Command/_apt-move7
-rw-r--r--Completion/Debian/Command/_bts8
-rw-r--r--Completion/Debian/Command/_dak31
-rw-r--r--Completion/Debian/Command/_dchroot8
-rw-r--r--Completion/Debian/Command/_dchroot-dsa8
-rw-r--r--Completion/Debian/Command/_dpkg-buildpackage2
-rw-r--r--Completion/Debian/Command/_dpkg-repack2
-rw-r--r--Completion/Debian/Command/_lintian2
-rw-r--r--Completion/Debian/Command/_madison2
-rw-r--r--Completion/Debian/Command/_make-kpkg6
-rw-r--r--Completion/Debian/Command/_pbuilder4
-rw-r--r--Completion/Debian/Command/_reprepro25
-rw-r--r--Completion/Debian/Command/_svn-buildpackage4
-rw-r--r--Completion/Debian/Command/_update-alternatives2
-rw-r--r--Completion/Debian/Command/_vim-addons65
17 files changed, 142 insertions, 135 deletions
diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt
index bf5343a94..db4ceef10 100644
--- a/Completion/Debian/Command/_apt
+++ b/Completion/Debian/Command/_apt
@@ -455,6 +455,7 @@ _apt-get () {
--tar-only:bool \
--arch-only:bool \
--allow-unauthenticated:bool \
+ --auto-remove:bool \
-- \
/$'update\0'/ \| \
/$'upgrade\0'/ \| \
diff --git a/Completion/Debian/Command/_apt-file b/Completion/Debian/Command/_apt-file
index eddbbdcf5..98a93fdd3 100644
--- a/Completion/Debian/Command/_apt-file
+++ b/Completion/Debian/Command/_apt-file
@@ -1,55 +1,59 @@
#compdef apt-file
-_apt-file() {
- local -a arguments
- local state line cmds
- arguments=(
- '(--cache -c)'{--cache,-c}'[cache directory]:directory:_directories'
- '(-v --verbose)'{-v,--verbose}'[verbose]'
- '(--cdrom-mount -d)'{--cdrom-mount,-d}'[cdrom mount point]:directory:_directories'
- '(--ignore-case -i)'{--ignore-case,-i}'[ignore case]'
- '(--regexp -r)'{--regexp,-r}'[regular expression]'
- '(-V --version)'{-V,--version}'[version]'
- '(-a --architecture)'{-a,--architecture}'[architecture]:architecture:(alpha arm hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 sparc)'
- '(-s --sources-list)'{-s,--sources-list}'[source.list file]:file:_files'
- '(-l --package-only)'{-l,--package-only}'[only display package name]'
- '(-F --fixed-string)'{-F,--fixed-string}'[do not expand search pattern]'
- '(-y --dummy)'{-y,--dummy}'[run in dummy mode]'
- '(-h --help)'{-h,--help}'[display help screen]'
- '1: :->cmds'
- '*: :->args'
- )
- _arguments -S $arguments
+local curcontext="$curcontext" state line expl cmds ret=1
+typeset -A opt_args
- case $state in
- cmds)
- cmds=(
- 'update:resynchronize package contents'
- 'search:search in which package file is included'
- 'list:list contents of a package'
- 'show:alias for list'
- 'purge:remove all Contents-<ARCH>.gz files in cache directory'
- )
- _describe -t commands 'apt-list command' cmds && ret=0
+_arguments -C -S \
+ '(--cache -c)'{--cache,-c}'[cache directory]:directory:_directories' \
+ '(-v --verbose)'{-v,--verbose}'[verbose]' \
+ '(--cdrom-mount -d)'{--cdrom-mount,-d}'[cdrom mount point]:directory:_directories' \
+ '(--from-file -f --from-deb -D)'{--from-file,-f}'[read patterns from given file]' \
+ '(--from-deb -D --from-file -f)'{--from-dev,-D}'[use contents of given .deb archives as patterns]' \
+ '(--ignore-case -i)'{--ignore-case,-i}'[ignore case]' \
+ '(--regexp -x)'{--regexp,-x}'[regular expression]' \
+ '(-V --version)'{-V,--version}'[version]' \
+ '(-a --architecture)'{-a,--architecture}'[architecture]:architecture:_deb_architectures' \
+ '(-s --sources-list)'{-s,--sources-list}'[source.list file]:file:_files' \
+ '(-l --package-only)'{-l,--package-only}'[only display package name]' \
+ '(-N --non-interactive)'{-N,--non-interactive}'[skip schemes requiring user input]' \
+ '(-F --fixed-string)'{-F,--fixed-string}'[do not expand search pattern]' \
+ '(-y --dummy)'{-y,--dummy}'[run in dummy mode]' \
+ '(-)'{-h,--help}'[display help screen]' \
+ '1: :->cmds' \
+ '*: :->args' && ret=0
+
+case $state in
+ cmds)
+ cmds=(
+ 'update:resynchronize package contents'
+ {find,search}:'search in which package file is included'
+ {list,show}:'list contents of a package'
+ 'purge:remove all Contents-<ARCH>.gz files in cache directory'
+ )
+ _describe -t commands 'apt-list command' cmds
+ ;;
+ args)
+ case $line[1] in
+ search|find)
+ if (( $#opt_args[(I)(-D|--from-deb)] )); then
+ _wanted files expl 'debian package' _files -g '*.deb(-.)'
+ elif (( $#opt_args[(I)(-f|--from-file)] )); then
+ _files
+ else
+ _message -e patterns "pattern"
+ fi
+ ;;
+ list|show)
+ _deb_packages avail
;;
- args)
- case $line[1] in
- search)
- _message "pattern"
- ;;
- list|show)
- _deb_packages avail
- ;;
- update|purge)
- # do nothing
- ;;
- *)
- _message "command $line[1] not available"
- ;;
- esac
+ update|purge)
+ # do nothing
+ ;;
+ *)
+ _message "command $line[1] not available"
;;
esac
+ ;;
+esac && ret=0
-}
-
-_apt-file "$@"
+return ret
diff --git a/Completion/Debian/Command/_apt-move b/Completion/Debian/Command/_apt-move
index a72378e6f..6911ef6f1 100644
--- a/Completion/Debian/Command/_apt-move
+++ b/Completion/Debian/Command/_apt-move
@@ -1,6 +1,6 @@
#compdef apt-move
-local curcontext="$curcontext" state line cmds ret=1
+local curcontext="$curcontext" state line expl cmds ret=1
typeset -A opt_args
_arguments -C \
@@ -45,7 +45,10 @@ case $state in
_files -g "*.d(sc|eb)(-.)" && ret=0
;;
listbin)
- _wanted lists expl list compadd mirror sync repo
+ _wanted lists expl list compadd mirror sync repo && ret=0
+ ;;
+ *)
+ _default && ret=0
;;
esac
;;
diff --git a/Completion/Debian/Command/_bts b/Completion/Debian/Command/_bts
index 4907d15c1..9f1f77bf4 100644
--- a/Completion/Debian/Command/_bts
+++ b/Completion/Debian/Command/_bts
@@ -40,10 +40,12 @@ case "$words[1]" in
;;
(show|bugs)
if [[ CURRENT -eq 2 ]]; then
- _wanted package expl 'package' _deb_packages avail
- _wanted maintainer expl 'package maintainer' compadd $DEBEMAIL
+ _alternative \
+ 'packages:package:_deb_packages avail' \
+ "emails:package maintainer:compadd $DEBEMAIL"
+ else
+ _wanted sep expl 'separator' compadd -S ' ' , .
fi
- _wanted sep expl 'separator' compadd -S ' ' , .
;;
reopen)
if [[ CURRENT -eq 2 ]]; then
diff --git a/Completion/Debian/Command/_dak b/Completion/Debian/Command/_dak
index 840fc0017..086196c4a 100644
--- a/Completion/Debian/Command/_dak
+++ b/Completion/Debian/Command/_dak
@@ -1,31 +1,26 @@
#compdef dak
-local curcontext="$curcontext" state line expl cmd args ret=1
-typeset -A opt_args
+local expl cmd args ret=1
-_arguments -C \
- '1: :->cmd' \
- '*:: :->args' && ret=0
-
-if (( ! $+_dak_cmds )); then
+if (( CURRENT == 2 )); then
+ if (( ! $+_dak_cmds )); then
typeset -gH _dak_cmds
_dak_cmds=(${${${(f)${"$(_call_program dak dak --help)"#*Availa#ble commands:}}#[^a-z] ##}%%[ ]*})
-fi
+ fi
-if [[ $state != 'args' ]]; then
- _describe -t subcommand 'subcommand' _dak_cmds
- return 0
+ _describe -t subcommands 'subcommand' _dak_cmds
+ return
fi
-cmd="$words[1]"
-curcontext="${curcontext%:*:*}:dak-$cmd:"
+cmd="$words[2]"
+local curcontext="${curcontext%:*:*}:dak-$cmd:"
args=( '(-)'{--help,-h}'[show help message]' )
case $cmd in
(ls)
args+=(
- '(-a --architecture)'{-a,--architecture=}':arch:_values -s , "architecture list" source all alpha amd64 arm hppa hurd-i386 i386 ia64 mips mipsel'
+ '(-a --architecture)'{-a,--architecture=}':arch:_sequence _deb_architectures -a "all source"'
'(-b --binary-type)'{-b,--binary-type=}':type:(deb udeb)'
'(-c --component)'{-c,--component=}':component:_values -s , "component list" main contrib non-free'
'(-g --greaterorequal)'{-g,--greaterorequal}
@@ -70,7 +65,7 @@ case $cmd in
;;
(rm)
args+=(
- '(-a --architecture)'{-a,--architecture=}':arch:_values -s , "architecture list" source all alpha amd64 arm hppa hurd-i386 i386 ia64 mips mipsel'
+ '(-a --architecture)'{-a,--architecture=}':arch:_sequence _deb_architectures -a "all source"'
'(-b --binary)'{-b,--binary}'[remove binaries only]'
'(-c --component)'{-c,--component=}':component:_values -s , "component list" main contrib non-free'
'(-C --carbon-copy)'{-C,--carbon-copy=}':cc address:_email_addresses'
@@ -96,7 +91,7 @@ case $cmd in
(make-suite-file-list)
args+=(
- '(-a --architecture)'{-a,--architecture=}':arch:_values -s , "architecture list" source all alpha amd64 arm hppa hurd-i386 i386 ia64 mips mipsel'
+ '(-a --architecture)'{-a,--architecture=}':arch:_sequence _deb_architectures -a "all source"'
'(-c --component)'{-c,--component=}':component:_values -s , "component list" main contrib non-free'
'(-n --no-delete)'{-n,--no-delete}'[do not delete older versions]'
'(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" oldstable stable testing unstable experimental'
@@ -239,10 +234,10 @@ case $cmd in
;;
(*)
- _files
+ args+=( '*: :_default' )
;;
esac
_arguments -s "$args[@]" && ret=0
-return $ret
+return ret
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/_dpkg-buildpackage b/Completion/Debian/Command/_dpkg-buildpackage
index d6f5c5f0a..b0eea5783 100644
--- a/Completion/Debian/Command/_dpkg-buildpackage
+++ b/Completion/Debian/Command/_dpkg-buildpackage
@@ -5,7 +5,7 @@ _arguments \
'-B[binary-only build, no source or arch-indep binaries]' \
'-S[source-only build, no binaries]' \
'-s-:source generation:((i\:default a\:force\ inclusion\ of\ original\ source d\:force\ exclusion\ of\ original\ source))' \
- '-a-:architecture:(alpha amd64 arm hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 sparc)' \
+ '-a-:architecture:_deb_architectures' \
'-v-:version:' \
'-C-:changes description:_files' \
'-m-:maintainer address:_email_addresses' \
diff --git a/Completion/Debian/Command/_dpkg-repack b/Completion/Debian/Command/_dpkg-repack
index 5d625a5ce..37f800516 100644
--- a/Completion/Debian/Command/_dpkg-repack
+++ b/Completion/Debian/Command/_dpkg-repack
@@ -2,6 +2,6 @@
_arguments \
'--root=[take package from filesystem rooted on <dir>]:root dir:_files -/' \
- '--arch=[force the package to be built for architecture <arch>]:architecture:(alpha amd64 arm hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 sparc)' \
+ '--arch=[force the package to be built for specified architecture]:architecture:_deb_architectures' \
'--generate[generate build directory but do not build deb]' \
'*:package:_deb_packages xinstalled'
diff --git a/Completion/Debian/Command/_lintian b/Completion/Debian/Command/_lintian
index 554be4550..773e7a182 100644
--- a/Completion/Debian/Command/_lintian
+++ b/Completion/Debian/Command/_lintian
@@ -31,7 +31,7 @@ case "$service" in
'--archivedir:archive directory:_files -/' \
'--dist:distribution:(woody sarge sid)' \
'--section:release:(main contrib non-free)' \
- '--arch:architecture:(alpha arm hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 sparc)' \
+ '--arch:architecture:_deb_architectures' \
'--root:root directory:_files -/' \
'(-a --all)'{-a,--all}'[check all packages in the distribution]' \
'(-b --binary)'{-b,--binary}'[the following packages are binary]' \
diff --git a/Completion/Debian/Command/_madison b/Completion/Debian/Command/_madison
index fc4821e91..445b79a45 100644
--- a/Completion/Debian/Command/_madison
+++ b/Completion/Debian/Command/_madison
@@ -1,7 +1,7 @@
#compdef madison rmadison
_arguments \
- '(-a --architecture)'{-a,--architecture=}':arch:_values -s , "architecture list" source all alpha arm hppa hurd-i386 i386 ia64 mips mipsel' \
+ '(-a --architecture)'{-a,--architecture=}':arch:_sequence _deb_architectures -a "all source" -' \
'(-b --binary)'{-b,--binary-type=}':type:(deb udeb)' \
'(-c --component)'{-c,--component=}':component:_values -s , "component list" main contrib non-free' \
'(-g --greaterorequal)'{-g,--greaterorequal} \
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/_pbuilder b/Completion/Debian/Command/_pbuilder
index 7811d567b..9322d036a 100644
--- a/Completion/Debian/Command/_pbuilder
+++ b/Completion/Debian/Command/_pbuilder
@@ -14,8 +14,8 @@ else
'--buildresult:location:_files -/' \
'--mirror:URL:_urls' \
'--othermirror:URL:_urls' \
- '--distribution:suite:(breezy dapper edgy etch feisty gutsy hardy hoary intrepid jaunty karmic lenny lucid potato sarge sid squeeze warty woody' \
- '--architecture:architecture:(alpha amd64 armel hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 sparc)' \
+ '--distribution:suite:(breezy dapper edgy etch feisty gutsy hardy hoary intrepid jaunty jessie karmic lenny lucid potato sarge sid squeeze warty woody' \
+ '--architecture:architecture:i_deb_architectures' \
'--components:component:(main contrib non-free)' \
'--override-config' \
'--hookdir:location:_files -/' \
diff --git a/Completion/Debian/Command/_reprepro b/Completion/Debian/Command/_reprepro
index 44ed1548c..d1e124eef 100644
--- a/Completion/Debian/Command/_reprepro
+++ b/Completion/Debian/Command/_reprepro
@@ -1,10 +1,10 @@
#compdef reprepro
-local context state line distfile
+local curcontext="$curcontext" state line expl distfile ret=1
typeset -A opt_args
local -a codenames
-_arguments \
+_arguments -C \
'(-h --help)'{-h,--help}'[display help]' \
'*'{-v,-V,--verbose}'[be more verbose]' \
'--silent[be less verbose]' \
@@ -17,7 +17,7 @@ _arguments \
'--listdir:list dir:_files -/' \
'--methoddir:method dir:_files -/' \
'(-C --component)'{-C,--component}':component:(component1 component2)' \
- '(-A --architecture)'{-A,--architecture}':architecture:(amd64 sparc)' \
+ '(-A --architecture)'{-A,--architecture}':architecture:_sequence -s "|" _deb_architectures -' \
'(-T --type)'{-T,--type}':file type:(dsc deb udeb)' \
'(-S --section)'{-S,--section}':section:(section1 section2)' \
'(-P --priority)'{-P,--priority}':priority:(high low)' \
@@ -40,12 +40,11 @@ _arguments \
rereference dumpreferences dumpunreferenced deleteunreferenced
reoverride dumptracks retrack removealltracks removetrack tidytracks
copy clearvanished gensnapshot rerunnotifiers)' \
- '*::subcmd:->subcmd' && return 0
+ '*::subcmd:->subcmd' && ret=0
case "$state" in
- (subcmd)
-
- case "$words[1]" in
+ subcmd)
+ case "$words[1]" in
(export|update|iteratedupdate|checkupdate|predelete|pull|checkpull|check)
if [[ -n "$opt_args[--confdir]" ]]; then
distfile=${opt_args[--confdir]}/distributions
@@ -60,11 +59,13 @@ case "$state" in
fi
codenames=($(awk '/^[Cc][Oo][Dd][Ee][Nn][Aa][Mm][Ee]: / {$1="";print}' "$distfile"))
- _wanted -V 'codenames' expl 'codename' compadd -a codenames
- ;;
+ _wanted -V 'codenames' expl 'codename' compadd -a codenames && ret=0
+ ;;
(*)
- _files
- ;;
- esac
+ _files && ret=0
+ ;;
+ esac
;;
esac
+
+return ret
diff --git a/Completion/Debian/Command/_svn-buildpackage b/Completion/Debian/Command/_svn-buildpackage
index 0b4d50125..e0f925896 100644
--- a/Completion/Debian/Command/_svn-buildpackage
+++ b/Completion/Debian/Command/_svn-buildpackage
@@ -28,8 +28,8 @@ _arguments \
'-B[binary-only build, no source or arch-indep binaries]' \
'-S[source-only build, no binaries]' \
'-s-:source generation:((i\:default a\:force\ inclusion\ of\ original\ source d\:force\ exclusion\ of\ original\ source))' \
- '-a-:architecture:(alpha amd64 arm hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 sparc)' \
- '-v-:version:' \
+ '-a-:architecture:_deb_architectures' \
+ '-v-:version' \
'-C-:changes description:_files' \
'-m-:maintainer address:_email_addresses' \
'-e-:maintainer address:_email_addresses' \
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
;;