Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

`read` gives a last null value following a trailing newline. Regression from fb8031162c2ffab270774f13c6904bb04cbba5a7.

authored by Ville Skyttä · committed by GitHub · parent 8afe9d1 · Browse files · 1 file+1 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:bash_completionsV2.go+1 added
186 unmodified lines
187 local longest=0188 local compline189 # Look for the longest completion so that we can format things nicely190 while IFS='' read -r compline; do191 [[ -z $compline ]] && continue192 # Strip any description before checking the length193 comp=${compline%%%%$tab*}194 # Only consider the completions that match195 [[ $comp == "$cur"* ]] || continue
133 unmodified lines