diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-02-27 18:37:13 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-02-27 18:37:13 -0800 |
commit | a1fc2f044f2e08b78931821068d08e2ea384ff10 (patch) | |
tree | adabc602ab25579c7972ac65156705f0c7037caa /etc | |
parent | 553193e924df96f55aaa163bc04599610de4337b (diff) | |
download | vyatta-op-a1fc2f044f2e08b78931821068d08e2ea384ff10.tar.gz vyatta-op-a1fc2f044f2e08b78931821068d08e2ea384ff10.zip |
* fix for bug 2771: bind space to completion for vbash users.
* add op commands to change the key behaviors.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/bash_completion.d/10vyatta-op | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op index 4eb5ba2..db5ae9d 100644 --- a/etc/bash_completion.d/10vyatta-op +++ b/etc/bash_completion.d/10vyatta-op @@ -35,8 +35,26 @@ 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 vbash + # use '?' for help + # use ' ' for completion + if [ "$SHELL" == "/bin/vbash" ]; then + if [ -f $HOME/.vyatta_key_query_help_disable ]; then + bind '"?": self-insert' + else + bind '"?": possible-completions' + fi + if [ -f $HOME/.vyatta_key_space_complete_disable ]; then + bind '" ": self-insert' + else + bind '" ": complete' + fi + fi +} + +_vyatta_op_do_key_bindings test -f /etc/default/vyatta && \ source /etc/default/vyatta |