From e8f71550c73e88fa0cef31b93009c6909d7aaf6b Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Mon, 6 Dec 2010 17:16:02 -0800 Subject: fix for bug 6494 * fix alternating completion/help for empty command line. --- etc/bash_completion.d/vyatta-cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg index 2c0a7bc..1374554 100755 --- a/etc/bash_completion.d/vyatta-cfg +++ b/etc/bash_completion.d/vyatta-cfg @@ -685,7 +685,7 @@ vyatta_config_complete () shopt -s extglob nullglob if [ "$COMP_LINE" == "$VYATTA_COMP_LINE" ]; then - VYATTA_COMP_LINE='' + VYATTA_COMP_LINE=$VYATTA_COMP_LINE_EMPTY vyatta_do_help=true else VYATTA_COMP_LINE=$COMP_LINE @@ -862,7 +862,8 @@ alias copy=/opt/vyatta/sbin/my_copy alias comment=/opt/vyatta/sbin/my_comment alias discard=/opt/vyatta/sbin/my_discard -export VYATTA_COMP_LINE="" +export VYATTA_COMP_LINE_EMPTY=VYATTA_COMP_LINE_EMPTY +export VYATTA_COMP_LINE=$VYATTA_COMP_LINE_EMPTY # readline bindings bind 'set show-all-if-ambiguous on' -- cgit v1.2.3