From 25d7fb404859bb2d5dea40775df83aa7a38c5c31 Mon Sep 17 00:00:00 2001 From: Roman Dobosz Date: Sun, 19 Mar 2023 16:36:37 +0100 Subject: [PATCH] Update bandwithctl command --- VBoxManage | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/VBoxManage b/VBoxManage index 315e994..6d69a72 100644 --- a/VBoxManage +++ b/VBoxManage @@ -507,13 +507,13 @@ _VBoxManage() { ;; bandwidthctl) - local items=(add set remove list) + local items=( add list remove set ) if [[ ${prev} == ${cmd} ]]; then _vms_comp vms else _find_item_name 2 subcommand=${COMP_WORDS[$((index+1))]} - if [[ " ${items[@]} " == *" $subcommand "* ]]; then + if [[ " ${items[*]} " == *" $subcommand "* ]]; then case "${subcommand}" in add) items=(--type --limit) @@ -524,7 +524,7 @@ _VBoxManage() { if [[ ${prev} == "set" ]]; then _bandwidthctl_comp else - [[ " ${COMP_WORDS[@]} " != *" --limit "* ]] && \ + [[ " ${COMP_WORDS[*]} " != *" --limit "* ]] && \ COMPREPLY=( $(compgen -W "--limit" -- \ ${cur}) ) fi