completions: Fix completions with a global option

After a global option was specified, a following string for global
options, commands, and command options was not complemented.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
This commit is contained in:
ERAMOTO Masaya
2019-03-06 09:56:33 +09:00
parent 5a050c1383
commit 79de2d9f09

View File

@@ -181,7 +181,9 @@ _cli_bash_autocomplete() {
local counter=1
counter=1
while [ $counter -lt $cword ]; do
case "!${words[$counter]}" in
case "${words[$counter]}" in
-*)
;;
*)
command=$(echo "${words[$counter]}" | sed 's/-/_/g')
cpos=$counter