diff options
author | An-Cheng Huang <ancheng@ancheng-vm.localdomain> | 2007-09-24 10:22:38 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@ancheng-vm.localdomain> | 2007-09-24 10:22:38 -0700 |
commit | cd856fcc2db0f0a94ab05de0e1e4fd98e89d3ffc (patch) | |
tree | 6502ab956a13f75088681c91ff2438435d4b9329 /etc | |
parent | 89ddc0286660c5b6be5072f6f68bf59e5f07e05e (diff) | |
parent | 6c83a427370acbdc4de3eee6feed143500fb4d8c (diff) | |
download | vyatta-op-cd856fcc2db0f0a94ab05de0e1e4fd98e89d3ffc.tar.gz vyatta-op-cd856fcc2db0f0a94ab05de0e1e4fd98e89d3ffc.zip |
Merge branch 'master' of phuket:/usr/local/git/vyatta-op
Diffstat (limited to 'etc')
-rw-r--r-- | etc/bash_completion.d/vyatta-op | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op index e440790..f87c28d 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 } |