Bash中自动补全时忽略大小写

原文链接http://www.cnblogs.com/sunjie21/archive/2012/06/08/2542168.html

编辑~/.inputrc(没有的话,就新建一个),在最后加一行: 

 

set completion-ignore-case on

 

保存,重新打开终端就可以了。

 


 

补充:

在~/.inputrc中加入:

“\e[A”: history-search-backward
“\e[B”: history-search-forward  

 能够让你在命令行输入字符之后,就可以用方向键Up,Down来搜索以该串字符开头的历史命令。

或者在~/.bashrc中加入:

bind '"\e[A": history-search-backward' 

bind '"\e[B": history-search-forward'

 

也能达到同样的效果。 

 

参考链接

http://www.cnblogs.com/mopmoq/archive/2009/04/08/1431883.html 

http://stackoverflow.com/questions/1030182/how-do-i-change-bash-history-completion-to-complete-whats-already-on-the-line

http://hints.macworld.com/article.php?story=20031026174236860 

https://wiki.archlinux.org/index.php/Bash_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

 

转载于:https://www.cnblogs.com/sunjie21/archive/2012/06/08/2542168.html

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...