From 54ed122d25dab95cacc2defb2d5601121bf1075a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aljaz=CC=8C=20=22g5pw=22=20Srebrnic=CC=8C?= Date: Sun, 31 Mar 2013 23:29:55 +0200 Subject: [PATCH] Set cache-policy before calling _arguments --- src/_port | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/_port b/src/_port index ab36f2d..177691f 100644 --- a/src/_port +++ b/src/_port @@ -48,6 +48,12 @@ _port() { '--show:Show which version is currently selected for the group (default if none given)' ) + local cache_policy + zstyle -s ":completion:${curcontext}:" cache-policy cache_policy + if [[ -z "$cache_policy" ]]; then + zstyle ":completion:${curcontext}:" cache-policy _port_caching_policy + fi + _arguments -s -C \ '-v[verbose mode (generate verbose messages)]' \ '-d[debug mode (generate debugging messages, implies -v)]' \ @@ -70,12 +76,6 @@ _port() { '*:extra:->extra' \ && return 0 - local cache_policy - zstyle -s ":completion:${curcontext}:" cache-policy cache_policy - if [[ -z "$cache_policy" ]]; then - zstyle ":completion:${curcontext}:" cache-policy _port_caching_policy - fi - case "$state" in extra) case "$words[2]" in