Skip to content
Myr

Fix handling of descriptions for bash v3 (#1735)

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

Fixes #1734 Tab characters that introduce completion descriptions weren't properly being handled with bash v3. This change fixes that.

authored by Marc Khouzam · committed by GitHub · parent ed7bb9d · Browse files · 1 file+1 added−1 removed
This commit

State

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

Trailers

  • Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:bash_completionsV2.go+1 added-1 removed
217 unmodified lines
218__%[1]s_handle_standard_completion_case() {219 local tab=$'\t' comp220221 # Short circuit to optimize if we don't have descriptions222 if [[ ${completions[*]} != *$tab* ]]; then222 if [[ "${completions[*]}" != *$tab* ]]; then223 IFS=$'\n' read -ra COMPREPLY -d '' < <(compgen -W "${completions[*]}" -- "$cur")224 return 0225 fi226
143 unmodified lines