From c388a9f495a6ffceb5a3ed6e9f6ddf2b4b5ef180 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Sun, 22 Jul 2007 11:40:00 +0000 Subject: 23691: declare local parameter scope for _arguments state. --- Completion/BSD/Command/_portsnap | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/BSD/Command/_portsnap b/Completion/BSD/Command/_portsnap index 0e79e1f64..1808bcd20 100644 --- a/Completion/BSD/Command/_portsnap +++ b/Completion/BSD/Command/_portsnap @@ -1,5 +1,8 @@ #compdef portsnap +local context state line +typeset -A opt_args + flags=( '(cron)fetch[Fetch a compressed snapshot or update existing one]' '(fetch)cron[Sleep rand(3600) seconds, and then fetch updates]' @@ -17,7 +20,7 @@ _arguments -C -s \ '-s:Server from which to fetch updates:_hosts' \ '*:principal:->principal' && ret=0 -if [[ $state = principal ]]; then +if [[ $state == principal ]]; then _alternative \ ':file flag:_values -S " " -w "commands" $flags[@]' \ '*:path:_files -/' -- cgit 1.4.1