diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-04 21:56:55 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-04 21:56:55 +0200 |
commit | f66d76f4414111f79dc73eb0f8b76f12741b4b81 (patch) | |
tree | 5062748fa68cfdd8e7ec14d89b955d2fde45aa82 /provides | |
parent | e2c5a8853828f2b4eed53b4cbd77ddcce39412ed (diff) |
pkg: pkg_list: Also list not-installed packages, depending on argument
Diffstat (limited to 'provides')
-rw-r--r-- | provides/zsh/completions/_pkg | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/provides/zsh/completions/_pkg b/provides/zsh/completions/_pkg index b28b1b3..e0d0b00 100644 --- a/provides/zsh/completions/_pkg +++ b/provides/zsh/completions/_pkg @@ -9,23 +9,23 @@ typeset expl function _pkg_action () { _wanted action expl 'action' \ - compadd add install delete eval remove info list{,-all} \ + compadd add install delete eval remove info list \ local-update log pull push remote-update refresh status update upgrade } function _pkg_installed () { _wanted package expl 'local package' \ - compadd $(pkg list) + compadd $(pkg list local) } function _pkg_all () { _wanted package expl 'package' \ - compadd $(pkg list-all) + compadd $(pkg list all) } function _pkg_notinstalled () { _wanted package expl 'remote package' \ - compadd $(diff <(pkg list) <(pkg list-all) | grep "^>" | cut -d " " -f 2) + compadd $(pkg list remote) } function _pkg_args { @@ -46,6 +46,10 @@ function _pkg_args { compadd $(grep -E '^\S*\s*\(\)\s*{' =pkg | cut -d ' ' -f 1) \ $(grep -E 'function \S* (\(\) )?{' =pkg | cut -d ' ' -f 2) ;; + list) + _wanted something expl 'list mode' \ + compadd all local remote + ;; *) _message 'no more arguments' ;; |