aboutsummaryrefslogtreecommitdiffstats
path: root/bash_include
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2011-11-24 23:52:53 +0800
committerLAN-TW <lantw44@gmail.com>2011-11-24 23:52:53 +0800
commite96d4d03e5225cc9b6895a51cd26c17c4423884e (patch)
tree907b24a6d2b0674c40b369d2ccd5dcb3d8ca8713 /bash_include
parentea9dedd0fb2d5c08dd09eb98474d3e844fc60daf (diff)
downloadconfigfile-e96d4d03e5225cc9b6895a51cd26c17c4423884e.tar
configfile-e96d4d03e5225cc9b6895a51cd26c17c4423884e.tar.gz
configfile-e96d4d03e5225cc9b6895a51cd26c17c4423884e.tar.bz2
configfile-e96d4d03e5225cc9b6895a51cd26c17c4423884e.tar.lz
configfile-e96d4d03e5225cc9b6895a51cd26c17c4423884e.tar.xz
configfile-e96d4d03e5225cc9b6895a51cd26c17c4423884e.tar.zst
configfile-e96d4d03e5225cc9b6895a51cd26c17c4423884e.zip
bash_include: 只有當 bash 在終端機下執行時才重新定義按鍵bash_include-20111124
Diffstat (limited to 'bash_include')
-rw-r--r--bash_include8
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