summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-09-30 12:23:05 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-09-30 12:49:38 -0500
commit42fbf0d30b5137ea8db9c01e7f3b26d472133406 (patch)
treed21e848d17a23e070e676e9eb1929cfd61dab525 /etc
parentfe1c6cac101c95c3fddf43f69f52fa1b8f9eb3a7 (diff)
downloadvyatta-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-op5
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[@]} \