From 6aba9ae67dd8868c9a060ebfa32f2bb19579596d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 13 Sep 2008 17:08:36 +0200 Subject: zsh completion: _arguments is not needed anymore --- provides/zsh/completions/_pkg | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'provides/zsh/completions/_pkg') 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' } -- cgit v1.2.3