diff options
author | Adrien <alfredp@laposte.net> | 2009-04-12 21:13:52 -0300 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-10-17 18:05:49 -0700 |
commit | be3fff92829d9d1fe4d3b55312563914265c9196 (patch) | |
tree | 28ccc88f39a97e2fd8f2699e2d480db4d8604c86 /share/completions/apt-cache.fish | |
parent | e52cf09bc188398cb00a2c514011e2e93ffe77f1 (diff) |
Add apt-cache completion for package names
Signed-off-by: Gustavo Noronha Silva <kov@kov.eti.br>
Diffstat (limited to 'share/completions/apt-cache.fish')
-rw-r--r-- | share/completions/apt-cache.fish | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/share/completions/apt-cache.fish b/share/completions/apt-cache.fish index 38432484..5c265e36 100644 --- a/share/completions/apt-cache.fish +++ b/share/completions/apt-cache.fish @@ -29,3 +29,14 @@ complete -f -c apt-cache -s v -l version --description "Display version and exit complete -r -c apt-cache -s c -l config-file --description "Specify config file" complete -x -c apt-cache -s o -l option --description "Specify options" +function __fish_apt-cache_use_package --description 'Test if apt command should have packages as potential completion' + for i in (commandline -opc) + if contains -- $i contains show showpkg showsrc depends rdepends dotty policy + return 0 + end + end + return 1 +end + +complete -c apt-cache -n '__fish_apt-cache_use_package' -a '(__fish_print_packages)' --description 'Package' + |