diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-10-05 17:54:26 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-10-05 17:54:26 -0500 |
commit | 3cbcd49add3fad2a14914bd0d66977fbfdd4e742 (patch) | |
tree | c0e322d98a27102160cf9ef71e2b9ca48b08bfb4 | |
parent | 771094e87adfad4adb3e3805f0bb58cc8ddbb1c8 (diff) | |
download | vyatta-op-3cbcd49add3fad2a14914bd0d66977fbfdd4e742.tar.gz vyatta-op-3cbcd49add3fad2a14914bd0d66977fbfdd4e742.zip |
fix stuck completion on non-lastword
-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 f96f877..560cbb4 100644 --- a/etc/bash_completion.d/vyatta-op +++ b/etc/bash_completion.d/vyatta-op @@ -422,6 +422,10 @@ _vyatta_op_expand () [ -n "$cur" ] && [[ "${COMPREPLY[0]}" =~ "$cur" ]]; then _vyatta_op_last_comp=${_vyatta_op_last_comp_init} + elif [ ${#_vyatta_op_completions[@]} -eq 1 ] && + [ -n "$current_prefix" ] && + [[ "${COMPREPLY[0]}" =~ "$current_prefix" ]]; then + _vyatta_op_last_comp=${_vyatta_op_last_comp_init} # if there are no completions then always show the non-comps elif [ "${COMP_WORDS[*]:0:$[$COMP_CWORD+1]}" == "$_vyatta_op_last_comp" ] || [ ${#_vyatta_op_completions[@]} -eq 0 ]; then |