Skip to content

Commit

Permalink
using shellcheck example
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jun 21, 2019
1 parent bf5003f commit 34d6879
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bash_completions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 34d6879

Please sign in to comment.