1 | "\e[A": history-search-backward |
在 /etc/inputrc
或者 ~/.inputrc 里加上如上配置,重新登录shell就行了
http://hints.macworld.com/article.php?story=20031026174236860
With Panther, the default shell is now Bash. I had customized my tcsh shell using this hint In bash you can get similar results by adding this to your .bash_profile1
2bind '"M-[A":history-search-backward'
bind '"M-[B":history-search-forward'
where M-[A is the up key and M-[B is the down key.