aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2016-03-06 21:29:09 +0800
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2016-03-06 21:29:09 +0800
commitf4c14b69a23e8a25c016b6ba65ef2f54b4833e6b (patch)
tree9d9024529dab377585f7ae62619280523d7ba33e /share
parentb4b52b82340985595949238966b68daa710c99b2 (diff)
Update dpkg completions to complete commonly used options
Closes #2798.
Diffstat (limited to 'share')
-rw-r--r--share/completions/dpkg.fish17
1 files changed, 15 insertions, 2 deletions
diff --git a/share/completions/dpkg.fish b/share/completions/dpkg.fish
index c199bdad..d60b6dba 100644
--- a/share/completions/dpkg.fish
+++ b/share/completions/dpkg.fish
@@ -1,6 +1,19 @@
complete -c dpkg -s i -l install -d 'Install .deb package' -xa '(__fish_complete_suffix .deb)'
-complete -c dpkg -s r -l remove -d 'Remove package' -xa '(__fish_print_packages)'
-complete -c dpkg -s P -l purge -d 'Purge package' -xa '(__fish_print_packages)'
+complete -c dpkg -l unpack -d 'Unpack .deb package' -xa '(__fish_complete_suffix .deb)'
+complete -c dpkg -l configure -d 'Configure package' -xa '(dpkg-query -W -f \'${Package}\n\')'
+complete -c dpkg -s r -l remove -d 'Remove package' -xa '(dpkg-query -W -f \'${Package}\n\')'
+complete -c dpkg -s P -l purge -d 'Purge package' -xa '(dpkg-query -W -f \'${Package}\n\')'
+complete -c dpkg -s V -l verify -d 'Verify contents of package' -xa '(dpkg-query -W -f \'${Package}\n\')'
complete -c dpkg -l force-all -d 'Continue on all problems'
+# dpkg-deb options
+complete -c dpkg -s b -l build -d 'Build package from directory' -xa '(__fish_complete_directories (commandline -ct))'
+complete -c dpkg -s c -l contents -d 'List contents of .deb' -xa '(__fish_complete_suffix .deb)'
+complete -c dpkg -s I -l info -d 'Show .deb information' -xa '(__fish_complete_suffix .deb)'
+
+# dpkg-query options
+complete -c dpkg -s l -l list -d 'List packages matching pattern' -xa '(dpkg-query -W -f \'${Package}\n\')'
+complete -c dpkg -s L -l listfiles -d 'List contents of packages' -xa '(dpkg-query -W -f \'${Package}\n\')'
+complete -c dpkg -s s -l status -d 'Print status of package' -xa '(dpkg-query -W -f \'${Package}\n\')'
+complete -c dpkg -s S -l search -d 'Search for packages containing file'