实现方法 打开~/.inputrc文件并输入如下内容: "\e[A": history-search-backward "\e[B": history-search-forward set show-all-if-ambiguous on set completion-ignore-case on 效果 当在shell输入前几个字符,就能通过方向键↑,↓快速找到以这几个字符开头且之前敲击过的命令