diff --git a/bash_completionsV2.go b/bash_completionsV2.go index 7c0b4f1..a06ab45 100644 --- a/bash_completionsV2.go +++ b/bash_completionsV2.go @@ -191,8 +191,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}