about summary refs log tree commit diff
path: root/Completion/BSD
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-07-22 11:40:00 +0000
committerClint Adams <clint@users.sourceforge.net>2007-07-22 11:40:00 +0000
commitc388a9f495a6ffceb5a3ed6e9f6ddf2b4b5ef180 (patch)
tree370459dfbfa2eeb1b77b08845c9377bb6b851679 /Completion/BSD
parentae5af3a655c73445e4c13ac2b74fe5357815dda9 (diff)
downloadzsh-c388a9f495a6ffceb5a3ed6e9f6ddf2b4b5ef180.tar.gz
zsh-c388a9f495a6ffceb5a3ed6e9f6ddf2b4b5ef180.tar.xz
zsh-c388a9f495a6ffceb5a3ed6e9f6ddf2b4b5ef180.zip
23691: declare local parameter scope for _arguments state.
Diffstat (limited to 'Completion/BSD')
-rw-r--r--Completion/BSD/Command/_portsnap5
1 files changed, 4 insertions, 1 deletions
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 -/'