Add completion for rev-upgrade subcommand

This commit is contained in:
Aljaž "g5pw" Srebrnič 2013-04-02 21:56:07 +02:00
parent 7b412ed1ba
commit 8d9cdfc589
1 changed files with 7 additions and 0 deletions

View File

@ -48,6 +48,8 @@ _port() {
'--show:Show which version is currently selected for the group (default if none given)'
)
revupgrade_options=('--id-loadcmd-check:Run more checks against a special loadcommand in Mach-O binaries')
local cache_policy
zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
if [[ -z "$cache_policy" ]]; then
@ -115,6 +117,11 @@ _port_dispatch() {
outdated_packages=("${(f)$(port outdated | sed -e '1 d' -e 's/^\([[:graph:]]*\).*/\1/')}")
_describe "Outdated ports" outdated_packages
;;
rev-upgrade)
if (( CURRENT == 3 )); then
_describe 'Rev-upgrade options' revupgrade_options
fi
;;
*)
# Cache the list of all ports.
if ( [[ ${+_port_available_packages} -eq 0 ]] || _cache_invalid PORT_AVAILABLE_PACKAGES ) &&