summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-10-04 18:24:53 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-10-04 18:24:53 -0500
commitc6512b179e7d7d3a4f030422ce0195fb5ec694f2 (patch)
treed3422b04530f4d14b9b84fc9e5e1040556bbfca0 /etc
parent63916c01ab90fd9c9cbadc76a700447f3846096f (diff)
downloadvyatta-cfg-c6512b179e7d7d3a4f030422ce0195fb5ec694f2.tar.gz
vyatta-cfg-c6512b179e7d7d3a4f030422ce0195fb5ec694f2.zip
Fix compare completion when comparing to the saved config
Diffstat (limited to 'etc')
-rwxr-xr-xetc/bash_completion.d/vyatta-cfg6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg
index 213dad9..1a543dc 100755
--- a/etc/bash_completion.d/vyatta-cfg
+++ b/etc/bash_completion.d/vyatta-cfg
@@ -333,9 +333,9 @@ vyatta_compare_complete ()
print_commit_log
COMPREPLY=( "" " " )
elif [ $COMP_CWORD -eq 2 -a -z "${COMP_WORDS[2]}" ]; then
- if [[ "${COMP_WORDS[1]}" == "saved" ]]; then
- echo "Possible completions:"
- echo -e " <Enter>\tCompare working and saved configurations"
+ if [[ "saved" =~ "${COMP_WORDS[1]}" ]]; then
+ echo -e "\nPossible completions:"
+ echo -en " <Enter>\tCompare working and saved configurations"
COMPREPLY=( "" " " )
eval $restore_shopts
return