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:55:10 -0500 |
commit | 150d2a3ef0b8fd559beda1cbcc47e0784b377fd9 (patch) | |
tree | 65e0cda3eb9226dc189b73b7441ca2254385dd43 /etc | |
parent | e746f14557390496dd041c802dcddf57d01c5161 (diff) | |
download | vyatta-op-150d2a3ef0b8fd559beda1cbcc47e0784b377fd9.tar.gz vyatta-op-150d2a3ef0b8fd559beda1cbcc47e0784b377fd9.zip |
fix stuck completion on non-lastword
Diffstat (limited to 'etc')
-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 |