Skip to content

Commit 34d6879

Browse files
committed
using shellcheck example
1 parent bf5003f commit 34d6879

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bash_completions.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ __%[1]s_handle_reply()
7272
else
7373
allflags=("${flags[*]} ${two_word_flags[*]}")
7474
fi
75-
while read -r -s -d " " c ; do
75+
while IFS='' read -r c; do
7676
COMPREPLY+=("$c")
7777
done < <(compgen -W "${allflags[*]}" -- "$cur")
7878
if [[ $(type -t compopt) = "builtin" ]]; then
@@ -124,12 +124,12 @@ __%[1]s_handle_reply()
124124
if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then
125125
completions+=("${must_have_one_flag[@]}")
126126
fi
127-
while read -r -s -d " " c ; do
127+
while IFS='' read -r c; do
128128
COMPREPLY+=("$c")
129129
done < <(compgen -W "${completions[*]}" -- "$cur")
130130
131131
if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then
132-
while read -r -s -d " " c ; do
132+
while IFS='' read -r c; do
133133
COMPREPLY+=("$c")
134134
done < <(compgen -W "${noun_aliases[*]}" -- "$cur")
135135
fi

0 commit comments

Comments
 (0)