summary refs log tree commit diff
path: root/Completion/Debian
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-02 21:27:08 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-02 21:27:08 +0000
commit63680c108bd05f3cb9401a7fcf547b53381d2c17 (patch)
tree47c957595b9d2d8fb65ec4a00b812706d6248c6e /Completion/Debian
parent1bc59a08736c6b8d0af1cfaa89e3daca5157cbae (diff)
downloadzsh-63680c108bd05f3cb9401a7fcf547b53381d2c17.tar.gz
zsh-63680c108bd05f3cb9401a7fcf547b53381d2c17.tar.xz
zsh-63680c108bd05f3cb9401a7fcf547b53381d2c17.zip
Initial revision
Diffstat (limited to 'Completion/Debian')
-rw-r--r--Completion/Debian/_apt-get23
-rw-r--r--Completion/Debian/_deb_packages7
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