Skip to content

Commit

Permalink
fix(bash-v2): skip empty completions when filtering descriptions (#1691)
Browse files Browse the repository at this point in the history
`read` gives a last null value following a trailing newline.

Regression from fb80311.
  • Loading branch information
scop committed May 17, 2022
1 parent 8afe9d1 commit e1ded5c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bash_completionsV2.go
Expand Up @@ -188,6 +188,7 @@ __%[1]s_handle_standard_completion_case() {
local compline
# Look for the longest completion so that we can format things nicely
while IFS='' read -r compline; do
[[ -z $compline ]] && continue
# Strip any description before checking the length
comp=${compline%%%%$tab*}
# Only consider the completions that match
Expand Down

0 comments on commit e1ded5c

Please sign in to comment.