From 6d762889ffa523806830795b5d1634475f9d14b0 Mon Sep 17 00:00:00 2001 From: slioch Date: Fri, 5 Jun 2009 16:43:14 -0700 Subject: fix for bug 4505 merge is now called merge. --- etc/bash_completion.d/20vyatta-cfg | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index a4147fd..1e0bc6c 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -46,7 +46,7 @@ declare last_idx=0 declare -a comp_words=() # commands to unalias -declare -a unalias_cmds=( clear configure date debug edit exit load load-merge \ +declare -a unalias_cmds=( clear configure date debug edit exit load merge \ no run set show save terminal undebug up top ) for cmd in "${unalias_cmds[@]}"; do unalias $cmd >& /dev/null @@ -138,7 +138,7 @@ load () eval "${vyatta_sbindir}/vyatta-load-config.pl $@" } -load-merge () +merge () { # don't load if there are uncommitted changes. if [ -f "$VYATTA_TEMP_CONFIG_DIR/$VYATTA_MOD_NAME" ]; then @@ -395,6 +395,13 @@ vyatta_loadsave_complete() echo -e " ftp://:@/\tLoad from file on remote machine" echo -e " http:///\t\t\tLoad from file on remote machine" echo -e " tftp:///\t\t\tLoad from file on remote machine" + elif [ "${COMP_WORDS[0]}" = "merge" ]; then + echo -e " \t\t\t\tMerge from system config file" + echo -e " \t\t\t\tMerge from file on local machine" + echo -e " scp://:@/\tMerge from file on remote machine" + echo -e " ftp://:@/\tMerge from file on remote machine" + echo -e " http:///\t\t\tMerge from file on remote machine" + echo -e " tftp:///\t\t\tMerge from file on remote machine" elif [ "${COMP_WORDS[0]}" = "save" ]; then echo -e " \t\t\t\tSave to system config file" echo -e " \t\t\t\tSave to file on local machine" @@ -892,7 +899,7 @@ vyatta_config_complete () "edit" \ "exit" \ "load" \ - "load-merge" \ + "merge" \ "rename" \ "run" \ "save" \ @@ -1247,6 +1254,7 @@ complete -F vyatta_config_complete exit complete -F vyatta_run_complete run complete -F vyatta_loadsave_complete save complete -F vyatta_loadsave_complete load +complete -F vyatta_loadsave_complete merge complete -F vyatta_config_complete copy complete -F vyatta_config_complete rename -- cgit v1.2.3