Avoid defining local variable options

zsh has the built in variable 'options'. zsh sometimes behaves
weirdly when there is a local variable that is named 'options'
This commit is contained in:
Shohei YOSHIDA
2023-08-17 12:13:27 +09:00
parent 75094d7275
commit ba54f170a6
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -339,9 +339,9 @@ _vboxmanage() {
&& ret=0
;;
(modifyvm|export)
local -a options=(${(@f)"$(vboxmanage $words[1] | perl -wln -e 'm{(--[a-zA-Z_-]+) [^]|]+} and print qq{$1:arg}')"})
local -a command_options=(${(@f)"$(vboxmanage $words[1] | perl -wln -e 'm{(--[a-zA-Z_-]+) [^]|]+} and print qq{$1:arg}')"})
_arguments \
$options \
$command_options \
':machine:_vboxmachines'
;;
(controlvm)