Mac配置好用的系統(tǒng)終端

終端

一、多色

1、找到系統(tǒng)配置文件

路徑

 /Users/用戶(hù)名/.bash_profile
2、添加以下代碼
export CLICOLOR=1
export LSCOLORS=gxfxaxdxcxegedabagacad

注:詳細(xì)講解代碼中的涵義:

CLICOLOR: 前景色和背景色的字符串合并值
LSCOLORS: 對(duì)于不同變量所采用的顏色方案,具體看如下表格:
a       black
b       red
c       green
d       brown
e       blue
f        magenta
g      cyan
h       light grey
A      bold black, usually shows up as dark grey
B       bold red
C      bold green
D      bold brown, usually shows up as yellow
E       bold blue
F       bold magenta
G     bold cyan
H      bold light grey; looks like bright white
x       default foreground or background
而文件類(lèi)型列表如下:
1. directory
2. symbolic link
3. socket
4. pipe
5. executable
6. block special
7. character special
8. executable with setuid bit set
9. executable with setgid bit set
10. directory writable to others, with sticky bit
11. directory writable to others, without sticky
所以對(duì)照這張表就可以得知:

gxfxaxdxcxegedabagacad
就是對(duì)于directory而言,它的前景色就是: g(cyan),而背景色就是:x(默認(rèn)的背景色).

二、自動(dòng)補(bǔ)全,不區(qū)分大小寫(xiě)

1、打開(kāi)終端,輸入:
nano .inputrc
2、在里面粘貼上以下語(yǔ)句:
set completion-ignore-case on
set show-all-if-ambiguous on
TAB: menu-complete

Control+O,保存,重啟終端,OK!

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀(guān)點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容