From c6512b179e7d7d3a4f030422ce0195fb5ec694f2 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Tue, 4 Oct 2011 18:24:53 -0500 Subject: Fix compare completion when comparing to the saved config --- etc/bash_completion.d/vyatta-cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'etc/bash_completion.d/vyatta-cfg') 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 " \tCompare working and saved configurations" + if [[ "saved" =~ "${COMP_WORDS[1]}" ]]; then + echo -e "\nPossible completions:" + echo -en " \tCompare working and saved configurations" COMPREPLY=( "" " " ) eval $restore_shopts return -- cgit v1.2.3