2013-01-26 13:32:43 +01:00
|
|
|
#compdef pcc
|
|
|
|
|
|
|
|
## Pacman custom completion
|
|
|
|
|
|
|
|
## Let's check if pacman completion is already loaded. If not, we parse the
|
|
|
|
## pacman completion file.
|
2016-06-23 23:18:36 +02:00
|
|
|
if type _pacman_action_none | grep -q "not found"; then
|
2014-11-12 17:22:59 +01:00
|
|
|
source "/usr/share/zsh/site-functions/_pacman"
|
2013-01-26 13:32:43 +01:00
|
|
|
fi
|
|
|
|
|
2014-11-12 17:22:59 +01:00
|
|
|
_pcc () {
|
|
|
|
case $words[1] in
|
|
|
|
pacsize)
|
|
|
|
case $words[2] in
|
2016-06-11 20:09:32 +02:00
|
|
|
-*)
|
|
|
|
return 1 ;;
|
2014-11-12 17:22:59 +01:00
|
|
|
*)
|
|
|
|
_pacman_action_sync
|
|
|
|
return ;;
|
|
|
|
esac
|
|
|
|
return ;;
|
|
|
|
*)
|
2016-06-11 20:09:32 +02:00
|
|
|
case $words[2] in
|
|
|
|
-*)
|
|
|
|
return 1 ;;
|
|
|
|
*)
|
|
|
|
_pacman_action_query
|
|
|
|
return ;;
|
|
|
|
esac
|
|
|
|
return ;;
|
2014-11-12 17:22:59 +01:00
|
|
|
esac
|
2013-01-26 13:32:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
_pcc "$@"
|
|
|
|
|
|
|
|
## Local Variables:
|
|
|
|
## mode: sh
|
|
|
|
## End:
|