Ubuntu中bash小技巧

编辑 ~/.inputrc 文件设置
如果没有该文件,新建一个就行了

文件末尾添加如下代码:
set match-hidden-files off

set show-all-if-ambiguous on
set completion-ignore-case on

"\e[A": history-search-backward
"\e[B": history-search-forward

解释:
show-all-if-ambiguous : 默认情况下,按下两次 才会出现提示,现在只需要一次了。
match-hidden-files : 不显示隐藏文件,特别是当你在 Home 目录时,你会觉得眼前好干净。
completion-ignore-case : 在自动补全时忽略大小写
history-search-* : 输入某个命令的一部分时,按上下箭头,会匹配关于这个这命令最近的使用历史。

你可能感兴趣的:(Ubuntu中bash小技巧)