Skip to content

Commit 7c9831d

Browse files
authored
Fix handling of descriptions for bash v3 (#1735)
Fixes #1734 Tab characters that introduce completion descriptions weren't properly being handled with bash v3. This change fixes that. Signed-off-by: Marc Khouzam <[email protected]>
1 parent ed7bb9d commit 7c9831d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bash_completionsV2.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ __%[1]s_handle_standard_completion_case() {
219219
local tab=$'\t' comp
220220
221221
# Short circuit to optimize if we don't have descriptions
222-
if [[ ${completions[*]} != *$tab* ]]; then
222+
if [[ "${completions[*]}" != *$tab* ]]; then
223223
IFS=$'\n' read -ra COMPREPLY -d '' < <(compgen -W "${completions[*]}" -- "$cur")
224224
return 0
225225
fi

0 commit comments

Comments
 (0)