Added support for usbdevsource command

This commit is contained in:
2017-10-08 09:11:20 +02:00
parent d79a8bc280
commit fbdd259cac

View File

@@ -2127,6 +2127,29 @@ _VBoxManage() {
fi fi
fi fi
;; ;;
usbdevsource)
if [[ COMP_CWORD -ge 3 ]]; then
subcommand="${COMP_WORDS[2]}"
if [[ $subcommand == "${cmd}" ]]; then
subcommand="${COMP_WORDS[3]}"
fi
fi
if [[ ${prev} == ${cmd} ]]; then
COMPREPLY=( $(compgen -W "add remove" -- ${cur}) )
else
if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
case "${subcommand}" in
add)
local items=(--address --backend)
_get_excluded_items "${items[@]}"
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
;;
esac
fi
fi
;;
esac esac
} }
complete -o default -F _VBoxManage VBoxManage complete -o default -F _VBoxManage VBoxManage