diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-09-30 12:23:05 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-09-30 12:49:38 -0500 |
commit | 42fbf0d30b5137ea8db9c01e7f3b26d472133406 (patch) | |
tree | d21e848d17a23e070e676e9eb1929cfd61dab525 /etc | |
parent | fe1c6cac101c95c3fddf43f69f52fa1b8f9eb3a7 (diff) | |
download | vyatta-op-42fbf0d30b5137ea8db9c01e7f3b26d472133406.tar.gz vyatta-op-42fbf0d30b5137ea8db9c01e7f3b26d472133406.zip |
If there are no completions then always show the non-completions, this gets rid of the empty tab completions
Diffstat (limited to 'etc')
-rw-r--r-- | etc/bash_completion.d/vyatta-op | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op index c1d27c8..aa344f1 100644 --- a/etc/bash_completion.d/vyatta-op +++ b/etc/bash_completion.d/vyatta-op @@ -313,8 +313,9 @@ _vyatta_op_expand () fi done fi - - if [ "${COMP_WORDS[*]}" == "$_vyatta_op_last_comp" ] ; then + # if there are no completions then always show the non-comps + if [ "${COMP_WORDS[*]}" == "$_vyatta_op_last_comp" ] || + [ ${#_vyatta_op_completions[@]} -eq 0 ]; then _vyatta_op_help "$cur" \ ${_vyatta_op_noncompletions[@]} \ ${_vyatta_op_completions[@]} \ |