summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@vyatta.com>2007-09-21 19:12:46 -0700
committerTom Grennan <tgrennan@vyatta.com>2007-09-21 19:12:46 -0700
commit6c83a427370acbdc4de3eee6feed143500fb4d8c (patch)
treeaee6fa4e030ddfb853f48f4c5c43daa33ad65d07 /etc
parent5aee4a9cf612685db2dad623429a1197c2dfac55 (diff)
downloadvyatta-op-6c83a427370acbdc4de3eee6feed143500fb4d8c.tar.gz
vyatta-op-6c83a427370acbdc4de3eee6feed143500fb4d8c.zip
yet more help crap
Diffstat (limited to 'etc')
-rw-r--r--etc/bash_completion.d/vyatta-op10
1 files changed, 7 insertions, 3 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op
index 4ac0009..6d1eb9b 100644
--- a/etc/bash_completion.d/vyatta-op
+++ b/etc/bash_completion.d/vyatta-op
@@ -182,11 +182,15 @@ _vyatta_op_expand ()
if _vyatta_op_scan "${COMP_WORDS[@]}" ; then
COMPREPLY=($( compgen -W "${_vyatta_op_allowed[*]}" -- $cur ))
- if [ "${COMP_WORDS[*]}" == "${_vyatta_op_comp_words[*]}" ] ; then
+ if [[ ${#COMPREPLY[@]} -ne 0 &&
+ "${COMP_WORDS[*]}" == "${_vyatta_op_comp_words[*]}" ]]
+ then
_vyatta_op_help && \
- COMPREPLY=($( compgen -W "--" -- $cur ))
+ COMPREPLY=($( compgen -W "== --" -- $cur ))
+ _vyatta_op_comp_words=
+ else
+ _vyatta_op_comp_words=( "${COMP_WORDS[@]}" )
fi
- _vyatta_op_comp_words=( "${COMP_WORDS[@]}" )
fi
}