mirror of
https://github.com/gryf/vboxmanage-bash-completion.git
synced 2025-12-17 19:40:17 +01:00
Update bandwithctl command
This commit is contained in:
@@ -507,13 +507,13 @@ _VBoxManage() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
bandwidthctl)
|
bandwidthctl)
|
||||||
local items=(add set remove list)
|
local items=( add list remove set )
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp vms
|
_vms_comp vms
|
||||||
else
|
else
|
||||||
_find_item_name 2
|
_find_item_name 2
|
||||||
subcommand=${COMP_WORDS[$((index+1))]}
|
subcommand=${COMP_WORDS[$((index+1))]}
|
||||||
if [[ " ${items[@]} " == *" $subcommand "* ]]; then
|
if [[ " ${items[*]} " == *" $subcommand "* ]]; then
|
||||||
case "${subcommand}" in
|
case "${subcommand}" in
|
||||||
add)
|
add)
|
||||||
items=(--type --limit)
|
items=(--type --limit)
|
||||||
@@ -524,7 +524,7 @@ _VBoxManage() {
|
|||||||
if [[ ${prev} == "set" ]]; then
|
if [[ ${prev} == "set" ]]; then
|
||||||
_bandwidthctl_comp
|
_bandwidthctl_comp
|
||||||
else
|
else
|
||||||
[[ " ${COMP_WORDS[@]} " != *" --limit "* ]] && \
|
[[ " ${COMP_WORDS[*]} " != *" --limit "* ]] && \
|
||||||
COMPREPLY=( $(compgen -W "--limit" -- \
|
COMPREPLY=( $(compgen -W "--limit" -- \
|
||||||
${cur}) )
|
${cur}) )
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user