diff options
Diffstat (limited to 'etc/bash_completion.d/10vyatta-op')
-rw-r--r-- | etc/bash_completion.d/10vyatta-op | 17 |
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 |