diff --git a/bash_completionsV2.go b/bash_completionsV2.go index 49d03bef6..8e22982f8 100644 --- a/bash_completionsV2.go +++ b/bash_completionsV2.go @@ -183,8 +183,7 @@ __%[1]s_handle_standard_completion_case() { # Strip any description before checking the length comp=${compline%%%%$tab*} # Only consider the completions that match - comp=$(compgen -W "$comp" -- "$cur") - [[ -z $comp ]] && continue + [[ $comp == "$cur"* ]] || continue COMPREPLY+=("$compline") if ((${#comp}>longest)); then longest=${#comp}