From b1f58ac09815887b948adfd8ccb574522f27656f Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Fri, 29 Feb 2008 15:29:17 -0800 Subject: partial fix for bug 2771: change default for root and add command for setting key behavior. --- etc/bash_completion.d/10vyatta-op | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op index 4eb5ba2..0af8f0c 100644 --- a/etc/bash_completion.d/10vyatta-op +++ b/etc/bash_completion.d/10vyatta-op @@ -35,8 +35,21 @@ test -z "$_vyatta_default_pager" && \ --no-lessopen" declare -x VYATTA_PAGER=$_vyatta_default_pager -# use '?' for help -bind '"?": possible-completions' +_vyatta_op_do_key_bindings () +{ + if [ "$SHELL" == "/bin/vbash" ]; then + # only do this if vbash + bind '"?": possible-completions' + fi + + nullglob_save=$(shopt -p nullglob) + shopt -u nullglob + bind_cmds=$(grep '^bind .* # vyatta key binding$' $HOME/.bashrc) + eval $bind_cmds + eval $nullglob_save +} + +_vyatta_op_do_key_bindings test -f /etc/default/vyatta && \ source /etc/default/vyatta -- cgit v1.2.3