File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -250,8 +250,8 @@ get_completions() {
250250 if [ " $COMPLETE_CALL_TYPE " == ' C' ]; then
251251 export COMP_CWORD COMP_LINE COMP_POINT COMP_WORDS COMP_WORDBREAKS
252252 mapfile -t COMPREPLY < <( " ${cmd[@]} " 2> " $errorout " )
253- else
254- " ${cmd[@]} " 2> " $errorout "
253+ elif ! " ${cmd[@]} " 2> " $errorout " ; then
254+ return 1
255255 fi
256256
257257 [ ${# COMPLETE_WORDS[@]} -gt 0 ] &&
Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ check_completion foo-with-multiple-words "foo --bar"
109109complete -o nospace -W " foo" foo-with-word-and-option
110110check_completion foo-with-word-and-option " foo" nospace
111111
112+ complete -F foo_complete_function_not_existant foo-with-function-invalid
113+ expect_failure foo-with-function-invalid
114+
112115function foo_complete_function_simple() {
113116 EXPECTED_COMPLETE_PROGRAM=foo-with-function-simple
114117 EXPECTED_COMPLETE_WORD=" ''"
You can’t perform that action at this time.
0 commit comments