diff options
author | LAN-TW <lantw44@gmail.com> | 2011-11-24 23:52:53 +0800 |
---|---|---|
committer | LAN-TW <lantw44@gmail.com> | 2011-11-24 23:52:53 +0800 |
commit | e96d4d03e5225cc9b6895a51cd26c17c4423884e (patch) | |
tree | 907b24a6d2b0674c40b369d2ccd5dcb3d8ca8713 | |
parent | ea9dedd0fb2d5c08dd09eb98474d3e844fc60daf (diff) | |
download | configfile-e96d4d03e5225cc9b6895a51cd26c17c4423884e.tar.gz configfile-e96d4d03e5225cc9b6895a51cd26c17c4423884e.tar.zst configfile-e96d4d03e5225cc9b6895a51cd26c17c4423884e.zip |
bash_include: 只有當 bash 在終端機下執行時才重新定義按鍵bash_include-20111124
-rw-r--r-- | bash_include | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bash_include b/bash_include index 85b7709..83e57c7 100644 --- a/bash_include +++ b/bash_include @@ -107,8 +107,12 @@ startcolor umask 0022 -bind '"\e[A":history-search-backward' -bind '"\e[B":history-search-forward' +tty -s +if [ "$?" == "0" ] +then + bind '"\e[A":history-search-backward' + bind '"\e[B":history-search-forward' +fi shopt -s histappend |