diff options
-rw-r--r-- | Completion/Debian/_apt-get | 23 | ||||
-rw-r--r-- | Completion/Debian/_deb_packages | 7 |
2 files changed, 30 insertions, 0 deletions
diff --git a/Completion/Debian/_apt-get b/Completion/Debian/_apt-get new file mode 100644 index 000000000..90e777246 --- /dev/null +++ b/Completion/Debian/_apt-get @@ -0,0 +1,23 @@ +#compdef apt-get + +_arguments -s \ + -{,-no-}d --{,no-}download-only \ + -{,-no-}f --{,no-}fix-broken \ + -{,-no-}h --{,no-}help \ + -{,-no-}v --{,no-}version \ + -{,-no-}m --{,no-}ignore-missing \ + --{,no-}fix-missing \ + --{,no-}no-download \ + \*-{,-no-}q \*--{,no-}{quiet,silent} \ + -{,-no-}s --{,no-}{simulate,just-print,dry-run,recon,no-act} \ + -{,-no-}y --{,no-}{yes,assume-yes} \ + -{,-no-}u --{,no-}show-upgraded \ + -{,-no-}b --{,no-}{compile,build} \ + --{,no-}ignore-hold \ + --{,no-}no-upgrade \ + --{,no-}force-yes \ + --{,no-}print-uris \ + {-{,-no-}c,--{,no-}config-file}':Configuration File:_files' \ + {-o,--option}':Foo\:\:Bar=bar:' \ + ':command:(update upgrade dselect-upgrade dist-upgrade install remove source check clean autoclean help)' \ + '*:package:_deb_packages' diff --git a/Completion/Debian/_deb_packages b/Completion/Debian/_deb_packages new file mode 100644 index 000000000..b5e4ffd85 --- /dev/null +++ b/Completion/Debian/_deb_packages @@ -0,0 +1,7 @@ +#autoload + +if (( ! $+_deb_packages )); then + _deb_packages=( $(awk '/^Package:/ { print $2 }' /var/lib/dpkg/status) ) +fi + +compadd "$@" - $_deb_packages |