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:23:05 -0500 |
commit | 62555abbddaf90092e0a389033f051345abdec14 (patch) | |
tree | 1082b7b22111f31ca10f6a268feb46630d2d9804 /etc | |
parent | 419e99faea0ffd33e0b7176bc0ff08927ff67de9 (diff) | |
download | vyatta-op-62555abbddaf90092e0a389033f051345abdec14.tar.gz vyatta-op-62555abbddaf90092e0a389033f051345abdec14.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[@]} \ |