vim ~/.inputrc 文件内容:
"e[A": history-search-backward"e[B": history-search-forwardset show-all-if-ambiguous onset completion-ignore-case on
保存退出后,在重新登录shell会变智能,比如你要连mysql,在shell中输入mysql 再按下UP键,以前的连接mysql命令就出来了,并且忽略大小写。