diff --git a/bash_completions.go b/bash_completions.go index cb3c59d71b..03ddda27a3 100644 --- a/bash_completions.go +++ b/bash_completions.go @@ -72,7 +72,7 @@ __%[1]s_handle_reply() else allflags=("${flags[*]} ${two_word_flags[*]}") fi - while read -r -s -d " " c ; do + while IFS='' read -r c; do COMPREPLY+=("$c") done < <(compgen -W "${allflags[*]}" -- "$cur") if [[ $(type -t compopt) = "builtin" ]]; then @@ -124,12 +124,12 @@ __%[1]s_handle_reply() if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then completions+=("${must_have_one_flag[@]}") fi - while read -r -s -d " " c ; do + while IFS='' read -r c; do COMPREPLY+=("$c") done < <(compgen -W "${completions[*]}" -- "$cur") if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then - while read -r -s -d " " c ; do + while IFS='' read -r c; do COMPREPLY+=("$c") done < <(compgen -W "${noun_aliases[*]}" -- "$cur") fi