diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-09-30 19:03:46 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-09-30 19:04:31 -0500 |
commit | 03847fc461562045dfec7e3ba4157780cb6ccbbe (patch) | |
tree | 14ce45ef710c212be18bbf197598168f2d65496d /etc/bash_completion.d/vyatta-op | |
parent | 7fcc8a9668dc26640eda1511e610d70f2f6570c8 (diff) | |
download | vyatta-op-03847fc461562045dfec7e3ba4157780cb6ccbbe.tar.gz vyatta-op-03847fc461562045dfec7e3ba4157780cb6ccbbe.zip |
Stop completions from getting stuck on nodes when backspacing to them
Diffstat (limited to 'etc/bash_completion.d/vyatta-op')
-rw-r--r-- | etc/bash_completion.d/vyatta-op | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op index f10084a..47fac56 100644 --- a/etc/bash_completion.d/vyatta-op +++ b/etc/bash_completion.d/vyatta-op @@ -387,6 +387,10 @@ _vyatta_op_expand () _vyatta_op_invalid_completion COMPREPLY=( "" " " ) _vyatta_op_last_comp=${_vyatta_op_last_comp_init} + # Stop completions from getting stuck + elif [ ${#_vyatta_op_completions[@]} -eq 1 ] && + [[ "$cur" == "${COMPREPLY[0]}" ]]; then + _vyatta_op_last_comp="${COMP_WORDS[*]}" # if there are no completions then always show the non-comps elif [ "${COMP_WORDS[*]}" == "$_vyatta_op_last_comp" ] || [ ${#_vyatta_op_completions[@]} -eq 0 ]; then |