summaryrefslogtreecommitdiff
path: root/provides
diff options
context:
space:
mode:
Diffstat (limited to 'provides')
-rw-r--r--provides/zsh/completions/_pkg12
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'
;;