大多數(shù)人在使用 Bash 時,都會對其進行改造,因為默認的設(shè)置真的好難用~
參考以下 ~/.inputrc 設(shè)置:
復制代碼 代碼如下:
# do not show hidden files in the list
set match-hidden-files off
# auto complete ignoring case
set show-all-if-ambiguous on
set completion-ignore-case on
"\ep": history-search-backward
"\e[A": history-search-backward
"\e[B": history-search-forward
默認情況下,按下兩次 tab> 才會出現(xiàn)提示,show-all-if-ambiguous 開啟后,只需要一次了。
關(guān)掉 match-hidden-files 不顯示隱藏文件,特比是當你在 Home 目錄時,你會覺得眼前好干凈。
開啟 completion-ignore-case 忽略大小寫,寫 PHP 時我估計大約 1/4 的按鍵都是 shift + 4,該死的美元符號!Shell 命令,我不想再和大寫字母糾纏了,讓 tab> 搞定好了。
history-search-*,輸入幾個字母,按上下箭頭,搜索你的歷史命令。
更多 Bash 定制請參考:
https://wiki.ubuntu.com/Spec/EnhancedBash
您可能感興趣的文章:- bash shell命令行選項與修傳入?yún)?shù)處理
- Bash Shell 注釋多行的幾種方法
- 使用bash shell刪除目錄中的特定文件的3種方法
- linux BASH shell下設(shè)置字體及背景顏色
- Bash Shell字符串操作小結(jié)
- csh,tcsh,bash,sh等shell的區(qū)別
- Bash Shell中Shift用法分享
- Shell 編程:Bash空格的那點事
- 讓代碼整潔、過程清晰的BASH Shell編程技巧
- shell(bash)下“time” 命令的輸出詳解