summaryrefslogtreecommitdiff
path: root/provides/zsh/completions/_pkg
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-09-13 17:08:36 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-09-13 17:08:36 +0200
commit6aba9ae67dd8868c9a060ebfa32f2bb19579596d (patch)
tree246bddb4c06520481f39493339f79641a17cc1c0 /provides/zsh/completions/_pkg
parent4e2a23b468e1b58416608cd4d527f74564b8f9f1 (diff)
zsh completion: _arguments is not needed anymore
Diffstat (limited to 'provides/zsh/completions/_pkg')
-rw-r--r--provides/zsh/completions/_pkg23
1 files changed, 18 insertions, 5 deletions
diff --git a/provides/zsh/completions/_pkg b/provides/zsh/completions/_pkg
index b9008f5..ef1da1e 100644
--- a/provides/zsh/completions/_pkg
+++ b/provides/zsh/completions/_pkg
@@ -28,13 +28,26 @@ function _pkg_notinstalled () {
compadd $(diff <(pkg list) <(pkg list-all) | grep "^>" | cut -d " " -f 2)
}
-if (( CURRENT >= 3 )) {
+if (( CURRENT == 2 )) {
+ _pkg_action
+} elif (( CURRENT == 3 )) {
case ${words[2]} in
changelog|check|delete|log|push|remove|status|upgrade)
- _arguments -s '2: :_pkg_installed' ;;
- info) _arguments -s '2: :_pkg_all' ;;
- add|install) _arguments -s '2: :_pkg_notinstalled' ;;
+ _pkg_installed
+ ;;
+ info)
+ _pkg_all
+ ;;
+ add|install)
+ _pkg_notinstalled
+ ;;
+ eval)
+ _message 'shell code for evaluation'
+ ;;
+ *)
+ _message 'no more arguments'
+ ;;
esac
} else {
- _pkg_action
+ _message 'no more arguments'
}