diff options
| author | SuCicada <pengyifu@gmail.com> | 2025-09-22 14:57:42 +0900 |
|---|---|---|
| committer | SuCicada <pengyifu@gmail.com> | 2025-09-22 14:59:42 +0900 |
| commit | 1ffeeec3b65432225b65004123e6c5a69581786b (patch) | |
| tree | 1e4343e5c7f79784a7279a67bb9f0be617574655 | |
| parent | Merge pull request #1152 from notmike-5/master (diff) | |
| download | zsh-completions-1ffeeec3b65432225b65004123e6c5a69581786b.tar zsh-completions-1ffeeec3b65432225b65004123e6c5a69581786b.tar.gz zsh-completions-1ffeeec3b65432225b65004123e6c5a69581786b.tar.bz2 zsh-completions-1ffeeec3b65432225b65004123e6c5a69581786b.tar.lz zsh-completions-1ffeeec3b65432225b65004123e6c5a69581786b.tar.xz zsh-completions-1ffeeec3b65432225b65004123e6c5a69581786b.tar.zst zsh-completions-1ffeeec3b65432225b65004123e6c5a69581786b.zip | |
Fix [virtualbox][vboxmanage controlvm] subcommand completion order and regex are incorrect
| -rw-r--r-- | src/_virtualbox | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/_virtualbox b/src/_virtualbox index 369abe9..344377a 100644 --- a/src/_virtualbox +++ b/src/_virtualbox @@ -345,10 +345,10 @@ _vboxmanage() { ':machine:_vboxmachines' ;; (controlvm) - local -a subcommands=(${(@f)"$(vboxmanage $words[1] | perl -wln -e 'm{^\s+([a-z][a-z-]+)} and print $1')"}) + local -a subcommands=(${(@f)"$(vboxmanage $words[1] | perl -wln -e 'm{VBoxManage controlvm.*?\s+([a-z][a-z-]+)(?:\s|$)} and print $1')"}) _arguments \ - '1:commands:'"($subcommands)" \ - ':machine:_vboxmachines' + '1:machine:_vboxmachines' \ + '2:commands:'"($subcommands)" ;; esac ;; |
