File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,8 @@ get_completions() {
215215 echo -n " WORDS: " >&2 ; printf " '%s'," " ${COMPLETE_WORDS[@]} " >&2 ; echo >&2
216216 fi
217217
218- if [ ${# COMPLETE_WORDS[@]} -gt 0 ]; then
218+ if [ ${# COMPLETE_WORDS[@]} -gt 0 ] ||
219+ [ ${# COMPLETE_OPTIONS[@]} -gt 0 ]; then
219220 echo " ${_COMP_OPTIONS[@]} "
220221 printf " %s\n" " ${COMPLETE_WORDS[@]} "
221222 return 0
Original file line number Diff line number Diff line change @@ -115,8 +115,8 @@ check_completion foo-with-multiple-options "foo" "nosort nospace"
115115complete -o nospace -W " foo bar" -o nosort foo-with-multiple-words-and-options
116116check_completion foo-with-multiple-words-and-options " foo bar" " nosort nospace"
117117
118- complete -o nospace -o nosort foo-with-only-options
119- expect_failure foo-with-only-options
118+ complete -o nospace -o nosort -o default foo-with-only-options
119+ check_completion foo-with-only-options ' ' " default nosort nospace "
120120
121121complete -F foo_complete_function_not_existant foo-with-function-invalid
122122expect_failure foo-with-function-invalid
You can’t perform that action at this time.
0 commit comments