Skip to content

Commit 333312d

Browse files
committed
bash-completion-getter: Ignore completion command stderr output
Completions must be written in the stdout, so we should ignore any error that may be written to stderr.
1 parent 274d42b commit 333312d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bash-completions-getter.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ get_completions() {
217217

218218
if [ "$COMPLETE_ACTION_TYPE" == 'C' ]; then
219219
export COMP_CWORD COMP_LINE COMP_POINT COMP_WORDS COMP_WORDBREAKS
220-
COMPREPLY=($("${cmd[@]}"))
220+
COMPREPLY=($("${cmd[@]}" 2>/dev/null))
221221
else
222-
${cmd[@]}
222+
${cmd[@]} 2>/dev/null
223223
fi
224224

225225
[ -n "$COMPLETE_WORDS" ] &&

0 commit comments

Comments
 (0)