From 79de2d9f09b191d44d2b1029c015888e03108c26 Mon Sep 17 00:00:00 2001 From: ERAMOTO Masaya Date: Wed, 6 Mar 2019 09:56:33 +0900 Subject: [PATCH] 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 --- completions/bash/skopeo | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/completions/bash/skopeo b/completions/bash/skopeo index a7918d3e..3a3d6c35 100644 --- a/completions/bash/skopeo +++ b/completions/bash/skopeo @@ -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