summaryrefslogtreecommitdiff
path: root/provides
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-09-14 21:40:06 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-09-14 21:40:06 +0200
commit348eaca4a92d66b5454195bd6317d554db5656b2 (patch)
tree64172a96684506fa06cbd4da69e8684eacabe34f /provides
parent6aba9ae67dd8868c9a060ebfa32f2bb19579596d (diff)
More excessive completion
Diffstat (limited to 'provides')
-rw-r--r--provides/zsh/completions/_pkg18
1 files changed, 18 insertions, 0 deletions
diff --git a/provides/zsh/completions/_pkg b/provides/zsh/completions/_pkg
index ef1da1e..0bd1b27 100644
--- a/provides/zsh/completions/_pkg
+++ b/provides/zsh/completions/_pkg
@@ -43,11 +43,29 @@ if (( CURRENT == 2 )) {
;;
eval)
_message 'shell code for evaluation'
+ _wanted function expl 'internal function' \
+ compadd $(grep -E '^\S*\s*\(\)\s*{' ~/bin/pkg | cut -d ' ' -f 1)
;;
*)
_message 'no more arguments'
;;
esac
+} elif [[ ${words[2]} = 'eval' ]] {
+ _message 'shell code for evaluation'
+ if (( CURRENT == 4 )) {
+ case ${words[3]} in
+ exec_hook|check_prereqs|*_collected|)
+ _pkg_installed
+ ;;
+ esac
+ } elif (( CURRENT == 5 )) {
+ case ${words[3]} in
+ exec_hook)
+ _wanted hook expl 'package hook' \
+ compadd $(ls -1 ~/packages/${words[4]}/hooks 2> /dev/null)
+ ;;
+ esac
+ }
} else {
_message 'no more arguments'
}