fix(bash-v2): skip empty completions when filtering descriptions

`read` gives a last null value following a trailing newline.

Regression from fb8031162c.
This commit is contained in:
Ville Skyttä 2022-05-04 11:22:12 +03:00
parent fb8031162c
commit 3e64861ebf

View file

@ -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