summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-02-29 15:29:17 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2008-02-29 15:29:17 -0800
commitb1f58ac09815887b948adfd8ccb574522f27656f (patch)
tree719f68cde8fb3bd3371f40eee81edf4160cfdbf3 /etc
parent0addbd328daaa27829fe088540eb9b12a4c8928d (diff)
downloadvyatta-op-b1f58ac09815887b948adfd8ccb574522f27656f.tar.gz
vyatta-op-b1f58ac09815887b948adfd8ccb574522f27656f.zip
partial fix for bug 2771: change default for root and add command for
setting key behavior.
Diffstat (limited to 'etc')
-rw-r--r--etc/bash_completion.d/10vyatta-op17
1 files changed, 15 insertions, 2 deletions
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