summaryrefslogtreecommitdiff
path: root/etc/bash_completion.d/vyatta-op
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-10-03 11:16:09 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-10-03 11:16:09 -0500
commitd4e34d096acdab1fff309871270242f6e21aceeb (patch)
tree7b387bbeba7921d3a8e707384131c785e3db700b /etc/bash_completion.d/vyatta-op
parent03847fc461562045dfec7e3ba4157780cb6ccbbe (diff)
downloadvyatta-op-d4e34d096acdab1fff309871270242f6e21aceeb.tar.gz
vyatta-op-d4e34d096acdab1fff309871270242f6e21aceeb.zip
Make completions not get stuck when backspacing over a character in the last word, so the only compreply now contains the current word but is not equal to the current word
Diffstat (limited to 'etc/bash_completion.d/vyatta-op')
-rw-r--r--etc/bash_completion.d/vyatta-op2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op
index 47fac56..833d4a3 100644
--- a/etc/bash_completion.d/vyatta-op
+++ b/etc/bash_completion.d/vyatta-op
@@ -389,7 +389,7 @@ _vyatta_op_expand ()
_vyatta_op_last_comp=${_vyatta_op_last_comp_init}
# Stop completions from getting stuck
elif [ ${#_vyatta_op_completions[@]} -eq 1 ] &&
- [[ "$cur" == "${COMPREPLY[0]}" ]]; then
+ [[ "${COMPREPLY[0]}" =~ "$cur" ]]; 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" ] ||