added pactree completion

This commit is contained in:
luolimao 2012-09-01 10:22:55 -04:00
parent 0f7eebbfac
commit b015709f56
1 changed files with 14 additions and 0 deletions

14
src/_pactree Normal file
View File

@ -0,0 +1,14 @@
#compdef pactree pactree.static=pactree
# copy this file to /usr/share/zsh/site-functions/_pactree
typeset -A opt_args
_pactree() {
local -a cmd packages packages_long
packages_long=(/var/lib/pacman/local/*(/))
packages=( ${${packages_long#/var/lib/pacman/local/}%-*-*} )
compadd "$@" -a packages
}
# run the main dispatcher
_pactree "$@"