summaryrefslogtreecommitdiff
path: root/Completion/Debian/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Debian/Command')
-rw-r--r--Completion/Debian/Command/_apt17
-rw-r--r--Completion/Debian/Command/_apt-file2
-rw-r--r--Completion/Debian/Command/_aptitude2
-rw-r--r--Completion/Debian/Command/_debdiff6
-rw-r--r--Completion/Debian/Command/_dpkg22
-rw-r--r--Completion/Debian/Command/_lintian2
-rw-r--r--Completion/Debian/Command/_piuparts2
-rw-r--r--Completion/Debian/Command/_sbuild141
-rw-r--r--Completion/Debian/Command/_vim-addons2
9 files changed, 171 insertions, 25 deletions
diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt
index dd837379c..4d60cd249 100644
--- a/Completion/Debian/Command/_apt
+++ b/Completion/Debian/Command/_apt
@@ -399,7 +399,13 @@ _apt-cmd () {
-o,--option:arbitem \
-t,--target-release:release \
-- \
- /$'list\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \
+ /$'list\0'/ \( \
+ \( \
+ /$'--installed\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# /'[]'/ \| \
+ // %-% /$'--[^\0]#\0'/ ':options:option:(--installed --upgradable --all-versions)' \
+ \| \) \
+ /$'[^-\0][^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \
+ \) \| \
/$'search\0'/ /$'[^\0]#\0'/ ':strings:pattern:' \| \
/$'showsrc\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \
/$'show\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \
@@ -409,15 +415,14 @@ _apt-cmd () {
/$'update\0'/ \| \
\( \
/$'(install|download|source|build-dep)\0'/ -'subcmd=${match%?}' \
- /$'[^\0]#\0'/ ':packages::_deb_packages -qr "\n\t\- /=" "$expl_packages[@]" avail' \# \
+ /$'[^\0]#\0'/ ':packages::_deb_packages -qr "\n\t\- /=+-" "$expl_packages[@]" avail' \# \
\( \
- // '%(.|)/%' -'[[ $subcmd = install ]]' /'[]'/ ':files:package file:_files -g "*.(changes|deb|dsc)(-.)"' \| \
+ // '%(.|)/%' -'[[ $subcmd = install ]]' /'[]'/ ':files: :_deb_files -c' \| \
/$'[^\0/=]#\/'/ /'[]'/ ':apt-releases:release name:_apt_releases' \| \
/$'[^\0/=]#='/ /'[]'/ ':apt-package-versions:package version:_apt_versions_of_binary_package' \| \
\) \
\) \| \
- /$'remove\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
- /$'purge\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
+ /$'(remove|reinstall|purge)\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
/$'upgrade\0'/ \| \
/$'autoclean\0'/ \| \
/$'changelog\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \
@@ -425,7 +430,7 @@ _apt-cmd () {
/$'full-upgrade\0'/ \| \
/$'dist-upgrade\0'/ \| \
/$'edit-sources\0'/ \| \
- /"[]"/ ':argument-1::compadd "$expl_action[@]" list search showsrc show depends rdepends policy update install download source build-dep remove upgrade full-upgrade dist-upgrade edit-sources autoclean changelog autoremove purge'
+ /"[]"/ ':argument-1::compadd "$expl_action[@]" list search showsrc show depends rdepends policy update install reinstall download source build-dep remove upgrade full-upgrade dist-upgrade edit-sources autoclean changelog autoremove purge'
_apt-cmd () {
local expl_action expl_packages subcmd
diff --git a/Completion/Debian/Command/_apt-file b/Completion/Debian/Command/_apt-file
index 98a93fdd3..5b24707d2 100644
--- a/Completion/Debian/Command/_apt-file
+++ b/Completion/Debian/Command/_apt-file
@@ -36,7 +36,7 @@ case $state in
case $line[1] in
search|find)
if (( $#opt_args[(I)(-D|--from-deb)] )); then
- _wanted files expl 'debian package' _files -g '*.deb(-.)'
+ _deb_files
elif (( $#opt_args[(I)(-f|--from-file)] )); then
_files
else
diff --git a/Completion/Debian/Command/_aptitude b/Completion/Debian/Command/_aptitude
index f79a100a8..bbaa8ebbd 100644
--- a/Completion/Debian/Command/_aptitude
+++ b/Completion/Debian/Command/_aptitude
@@ -56,7 +56,7 @@ _arguments -C \
'(-F --display-format)'{-F,--display-format}'[specify output format for search command]:format:_aptitude_format_strings' \
'(-O --sort)'{-O,--sort}'[specify sort order]:sort order:()' \
'(-w --width)'{-w,--width}'[specify output width]:width' \
- '-f[aggressivley try to fix dependencies of broken packages]' \
+ '-f[aggressively try to fix dependencies of broken packages]' \
'(-V --show-versions)'{-V,--show-versions}'[show which versions of packages will be installed]' \
'(-D --show-deps)'{-D,--show-deps}'[show brief explanations of automatic installations and removals]' \
'-Z[show disk space changes for each package]' \
diff --git a/Completion/Debian/Command/_debdiff b/Completion/Debian/Command/_debdiff
index 6f8519a4a..9e8ffd594 100644
--- a/Completion/Debian/Command/_debdiff
+++ b/Completion/Debian/Command/_debdiff
@@ -17,6 +17,6 @@ _arguments \
'(-h --help)'{-h,--help}'[show help]' \
'(-v --version)'{-v,--version}'[show version]' \
'(-q --quiet)'{-q,--quiet}'[be quiet if no differences]' \
- '--from:debs:_files -g "*.deb(-.)"' \
- '--to:debs:_files -g "*.deb(-.)"' \
- '*:file to compare:_files -g "*.(deb|changes|dsc)(-.)"'
+ '--from: :_deb_files' \
+ '--to: :_deb_files' \
+ '*:file to compare:_deb_files -c'
diff --git a/Completion/Debian/Command/_dpkg b/Completion/Debian/Command/_dpkg
index 3503d09b9..3477e6116 100644
--- a/Completion/Debian/Command/_dpkg
+++ b/Completion/Debian/Command/_dpkg
@@ -18,24 +18,24 @@ _dpkg_deb_only_actions=(
_dpkg_deb_actions=(
'(--build -b)'{--build,-b}'[build archive]:directory:_files -/'
- '(--contents -c)'{--contents,-c}'[list contents]:Debian package:_files -g "*.u#deb(-.)"'
- '(--info -I)'{--info,-I}'[show info]:Debian package:_files -g "*.u#deb(-.)"'
- '(--field -f)'{--field,-f}'[show fields]:Debian package:_files -g "*.u#deb(-.)"'
- '(--control -e)'{--control,-e}'[extract control]:Debian package:_files -g "*.u#deb(-.)"'
- '(--extract -x)'{--extract,-x}'[extract files]:Debian package:_files -g "*.u#deb(-.)"'
- '(--vextract -X)'{--vextract,-X}'[extract and list files]:Debian package:_files -g "*.u#deb(-.)"'
- '--fsys-tarfile[output fs tarfile]:Debian package:_files -g "*.u#deb(-.)"'
+ '(--contents -c)'{--contents,-c}'[list contents]: :_deb_files'
+ '(--info -I)'{--info,-I}'[show info]: :_deb_files'
+ '(--field -f)'{--field,-f}'[show fields]: :_deb_files'
+ '(--control -e)'{--control,-e}'[extract control]: :_deb_files'
+ '(--extract -x)'{--extract,-x}'[extract files]: :_deb_files'
+ '(--vextract -X)'{--vextract,-X}'[extract and list files]: :_deb_files'
+ '--fsys-tarfile[output fs tarfile]: :_deb_files'
)
_dpkg_common_actions=(
'--help[show help]'
'--version[show version]'
- '(--license --licence)'{--license,--licence}'[show licencing]'
+ '(--license --licence)'{--license,--licence}'[show licensing]'
)
_dpkg_actions=(
'(--install -i)'{--install,-i}'[install packages]:*:Debian packages:->install'
- '--unpack[unpack package]:Debian package:_files -g "*.deb(-.)"'
+ '--unpack[unpack package]: :_deb_files'
'--configure[reconfigure specified packages]:*:package:->configure'
'(--remove -r)'{--remove,-r}'[remove package]:*:package:->remove'
'(--purge -P)'{--purge,-P}'[purge package]:*:package:->purge'
@@ -76,7 +76,7 @@ _dpkg_options=(
_dpkg_options_recursive=( '(--recursive -R)'{--recursive,-R}'[recursive]' )
_dpkg_deb_and_query_only_actions=(
- '(--show -W)'{--show,-W}'[show package info]:Debian package:_files -g \*.u\#deb\(-.\)'
+ '(--show -W)'{--show,-W}'[show package info]: :_deb_files'
)
_dpkg_deb_and_query_only_options=(
@@ -147,7 +147,7 @@ case "$state" in
"$_dpkg_options_recursive[@]" \
'*:directory:_path_files -/' \
- nonrecur \
- '*:Debian package:_path_files -g "*.deb(-.)"'
+ '*: :_deb_files'
;;
remove|status|listfiles)
_call_function ret _dpkg_$state && return ret
diff --git a/Completion/Debian/Command/_lintian b/Completion/Debian/Command/_lintian
index d60acc9ed..71e71ee3d 100644
--- a/Completion/Debian/Command/_lintian
+++ b/Completion/Debian/Command/_lintian
@@ -38,7 +38,7 @@ case "$service" in
'(-s --source)'{-s,--source}'[the following packages are source]' \
'--udeb[the following packages are udebs]' \
'(-p --packages-file)'{-p,--packages-file}'[process packages listed in file]:list:_files' \
- '*:package:_files -g "*.(changes|deb|dsc)(-.)"' && return 0
+ '*: :_deb_files -c' && return 0
;;
(lintian-info)
diff --git a/Completion/Debian/Command/_piuparts b/Completion/Debian/Command/_piuparts
index a1b6666a3..1da0e85e9 100644
--- a/Completion/Debian/Command/_piuparts
+++ b/Completion/Debian/Command/_piuparts
@@ -24,7 +24,7 @@ case "$state" in
if (( $+opt_args[-a] )); then
_deb_packages avail
else
- _files -g '*.deb(-.)'
+ _deb_files
fi
;;
esac
diff --git a/Completion/Debian/Command/_sbuild b/Completion/Debian/Command/_sbuild
new file mode 100644
index 000000000..a32b5e8c5
--- /dev/null
+++ b/Completion/Debian/Command/_sbuild
@@ -0,0 +1,141 @@
+#compdef sbuild
+
+_sbuild_distributions() {
+ _deb_codenames
+ compadd "$@" -- unstable
+}
+
+_deb_identities() {
+ local identity
+
+ if [[ -n "${DEBEMAIL}" ]]; then
+ if [[ -n "${DEBFULLNAME}" ]]; then
+ identity="${DEBFULLNAME} <${DEBEMAIL}>"
+ else
+ identity="${DEBEMAIL}"
+ fi
+ compadd "$@" -- "${identity}"
+ fi
+}
+
+_sbuild_signing_keys() {
+ local -a expl lines uids
+ local line
+
+ lines=( ${(M)${(f)"$(_call_program keys gpg -K --with-colons)"}:#uid:u*} )
+
+ for line in "${lines[@]}"; do
+ uids+=("${${(s.:.)line}[5][(ws:<:)2,(ws:>:)1]}")
+ done
+
+ _description keys expl "gpg key"
+ compadd "$@" "$expl[@]" -- "${uids[@]}"
+}
+
+_sbuild() {
+ _arguments \
+ '(-h --help)'{-h,--help}'[show help message]' \
+ '(-V --version)'{-V,--version}'[show version information]' \
+ '(-D --debug)'{-D,--debug}'[enable debug output]' \
+ '--add-depends=[add dependencies to source package]:packages' \
+ '--add-conflicts=[add conflicts to source package]:packages' \
+ '--add-depends-arch=[add arch dependencies to source package]:packages' \
+ '--add-conflicts-arch=[add arch conflicts to source package]:packages' \
+ '--add-depends-indep=[add indep dependencies to source package]:packages' \
+ '--add-conflicts-indep=[add indep conflicts to source package]:packages' \
+ '--arch=[architecture]:architecture:_deb_architectures' \
+ '--host=[host architecture]:architecture:_deb_architectures' \
+ '--build=[build architecture]:architecture:_deb_architectures' \
+ '(-A --arch-all --no-arch-all)'{-A,--arch-all}'[build Architecture: all packages]' \
+ '(-A --arch-all --no-arch-all)--no-arch-all[do not build Architecture: all packages]' \
+ '(--arch-any --no-arch-any)--arch-any[build Architecture: any packages]' \
+ '(--arch-any --no-arch-any)--no-arch-any[do not build Architecture: any packages]' \
+ '(-b --batch)'{-b,--batch}'[operate in batchmode]' \
+ '(-c --chroot)'{-c=,--chroot=}'[chroot to use]:chroot' \
+ '(--chroot-mode)--chroot-mode=[chroot mode]:mode:(schroot sudo autopkgtest unshare)' \
+ '(-d --dist)'{-d=,--dist=}'[distribution]:distribution:_sbuild_distributions' \
+ '--archive=[use specified archive]' \
+ '(--apt-clean --no-apt-clean)--apt-clean[force apt-get clean]' \
+ '(--apt-clean --no-apt-clean)--no-apt-clean[do not apt-get clean]' \
+ '(--apt-upgrade --no-apt-upgrade)--apt-upgrade[force apt-get upgrade]' \
+ '(--apt-upgrade --no-apt-upgrade)--no-apt-upgrade[do not apt-get upgrade]' \
+ '(--apt-distupgrade --no-apt-distupgrade)--apt-distupgrade[force apt-get distupgrade]' \
+ '(--apt-distupgrade --no-apt-distupgrade)--no-apt-distupgrade[do not apt-get distupgrade]' \
+ '(-m --maintainer)'{-m=,--maintainer=}'[maintainer field for .changes]:maintainer:_deb_identities' \
+ '(-e --uploader)'{-e=,--uploader=}'[uploader field for .changes]:uploader:_deb_identities' \
+ '(-k --keyid)'{-k=,--keyid=}'[GPG Key to sign packages]: :_sbuild_signing_keys' \
+ '(-j --jobs)'{-j=,--jobs=}'[jobs to run simultaneously]:number of jobs' \
+ '--debbuildopt=[option to dpkg-buildpackage]:option' \
+ '--debbuildopts=[options to dpkg-buildpackage]:options' \
+ '--dpkg-source-opt=[option to dpkg-source]:option' \
+ '--dpkg-source-opts=[options to dpkg-source]:options' \
+ '--mail-log-to=[send log to mail]:recipient:_email_addresses -c' \
+ '--mailfrom=[mail from]:sender:_email_addresses -c' \
+ '(-n --nolog)'{-n,--nolog}'[no build log file]' \
+ '--profiles=[profiles for dpkg-buildpackage]:profile list (comma separated)' \
+ '(-p --purge)'{-p=,--purge=}'[purge mode]:purge mode:(never successful always)' \
+ '--purge-build=[build purge mode]:purge mode:(never successful always)' \
+ '--purge-deps=[deps purge mode]:purge mode:(never successful always)' \
+ '--purge-session=[session purge mode]:purge mode:(never successful always)' \
+ '(-s --source --no-source)'{-s,--source}'[build source package]' \
+ '(-s --source --no-source)--no-source[do not build source package]' \
+ '--force-orig-source[force orig.tar.gz in .changes]' \
+ '--use-snapshot[use latest gcc snapshot]' \
+ '(-v --verbose)'{-v,--verbose}'[be verbose]' \
+ '(-q --quiet)'{-q,--quiet}'[be quiet]' \
+ '--make-binNMU=[create binNMU with changelog entry]:changelog entry' \
+ '--binNMU=[binNMU version]:version' \
+ '--append-to-version=[append string to version]:string' \
+ '--binNMU-timestamp=[binNMU timestamp]:timestamp' \
+ '--binNMU-changelog=[use this file as binNMU changelog]:file:_files' \
+ '--build-dir=[build directory]:directory:_files -/' \
+ '(--clean-source --no-clean-source)--clean-source[clean inside an unpacked source tree]' \
+ '(--clean-source --no-clean-source)--no-clean-source[do not clean inside an unpacked source tree]' \
+ '(--run-lintian --no-run-lintian)--run-lintian[run lintian]' \
+ '(--run-lintian --no-run-lintian)--no-run-lintian[do not run lintian]' \
+ '(--no-run-lintian --lintian-opt)--lintian-opt=[option for lintian]:option' \
+ '(--no-run-lintian --lintian-opts)--lintian-opts=[options for lintian]:options' \
+ '(--run-piuparts --no-run-piuparts)--run-piuparts[run piuparts]' \
+ '(--run-piuparts --no-run-piuparts)--no-run-piuparts[do not run piuparts]' \
+ '(--no-run-piuparts --piuparts-opt)--piuparts-opt=[option for piuparts]:option' \
+ '(--no-run-piuparts --piuparts-opts)--piuparts-opts=[options for piuparts]:options' \
+ '(--no-run-piuparts --piuparts-root-arg)--piuparts-root-arg=[root-argion for piuparts]:argument' \
+ '(--no-run-piuparts --piuparts-root-args)--piuparts-root-args=[root-argions for piuparts]:arguments' \
+ '(--run-autopkgtest --no-run-autopkgtest)--run-autopkgtest[run autopkgtest]' \
+ '(--run-autopkgtest --no-run-autopkgtest)--no-run-autopkgtest[do not run autopkgtest]' \
+ '(--no-run-autopkgtest --autopkgtest-opt)--autopkgtest-opt=[option for autopkgtest]:option' \
+ '(--no-run-autopkgtest --autopkgtest-opts)--autopkgtest-opts=[options for autopkgtest]:options' \
+ '(--no-run-autopkgtest --autopkgtest-root-arg)--autopkgtest-root-arg=[root-argion for autopkgtest]:argument' \
+ '(--no-run-autopkgtest --autopkgtest-root-args)--autopkgtest-root-args=[root-argions for autopkgtest]:arguments' \
+ '--pre-build-commands=[run commands before starting anything]:commands' \
+ '--chroot-setup-commands=[run commands after chroot initialization]:commands' \
+ '--chroot-update-failed-commands=[run commands after chroot update fails]:commands' \
+ '--build-deps-failed-commands=[run commands after installing build deps fails]:commands' \
+ '--starting-build-commands=[run commands after dependencies are installed]:commands' \
+ '--finished-build-commands=[run commands after package is built]:commands' \
+ '--build-failed-commands=[run commands after dpkg-buildpackage fails]:commands' \
+ '--chroot-cleanup-commands=[run commands after chroot cleanup]:commands' \
+ '--post-build-commands=[run commands after package is built successfully]:commands' \
+ '--post-build-failed-commands[run commands after package failed to build]:commands' \
+ '--anything-failed-commands=[run commands for all --xxx-failed-commands option]:commands' \
+ '--log-external-command-output[external commands output are logged]' \
+ '--log-external-command-error[external commands error output are logged]' \
+ '--build-dep-resolver=[resolver for build dependency]:resolver:(apt aptitude aspcud xapt null)' \
+ '--aspcud-criteria=[Optimization for aspcud]:criteria' \
+ '(--resolve-alternatives --no-resolve-alternatives)--resolve-alternatives[allow alternatives in Build-Depends*]' \
+ '(--resolve-alternatives --no-resolve-alternatives)--no-resolve-alternatives[disallow alternatives in Build-Depends*]' \
+ '--extra-package=[make a package or directory available to the resolver]:package:_files -g "*deb(-.)' \
+ '--extra-repository=[add a repository to the resolver]:url' \
+ '--extra-repository-key=[add key to the resolver]:key:_files -g "*.asc(-.)"' \
+ '--build-path=[place to build the package inside chroot]:path:_files -/' \
+ '--autopkgtest-virt-server=[autopkgtest virtualization server]:type:(schroot lxc chroot qemu ssh)' \
+ '--autopkgtest-virt-server-opt=[option for autopkgtest virtialization server]:option' \
+ '--autopkgtest-virt-server-opts=[options for autopkgtest virtialization server]:options' \
+ '--sbuild-mode=[switch to buildd mode]:mode:(user buildd)' \
+ '--stats-dir=[write stats to directory]:path:_files -/' \
+ '--purge-extra-packages[remove all but strictly required dependencies (experimental)]' \
+ '--bd-uninstallable-explainer=[choose the method to explain why dependencies failed]:method:(dose3 apt)' \
+ '*:dsc file:_files -g "*.dsc(-.)"'
+ }
+
+_sbuild "$@"
diff --git a/Completion/Debian/Command/_vim-addons b/Completion/Debian/Command/_vim-addons
index 0ad39955d..76f701491 100644
--- a/Completion/Debian/Command/_vim-addons
+++ b/Completion/Debian/Command/_vim-addons
@@ -12,7 +12,7 @@ _arguments \
'(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]' \
+ '(-z --silent -v --verbose)'{-z,--silent}'[suppress most output]' \
'1:commands:((
install\:install\ specified\ addons
remove\:remove\ specified\ addons