起因

每天看着mac这“shi”一样的终端,没有高亮,眼睛要废掉了,之前看过美化之后的终端,看了网上很多教程,也美化一下

https://pic-1259640338.cos.ap-shanghai.myqcloud.com/img/Screen Shot 2021-06-13 at 00.15.39.png

一、安装 iTerm2

https://www.iterm2.com/ 中下载,然后正常想安装应用程序一样安装就可以了 Mac默认使用dash作为终端,可以改成Zsh 终端键入

cdsh -s /bin/zsh

二、安装 Oh my zsh

终端键入

sh -c "$(wget [<https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh>](<https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh>) -O -)"

如果没安装wget 终端键入 brew install wget 如果没安装brew 终端键入

/usr/bin/ruby -e "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/master/install>)"

完成显示 oh my zsh 则安装成功

https://pic-1259640338.cos.ap-shanghai.myqcloud.com/img/Screen Shot 2021-06-13 at 00.18.51.png

三、安装字体库

随便找个文件夹,在终端中进入这个文件夹然后执行

git clone [<https://github.com/powerline/fonts.git>](<https://github.com/powerline/fonts.git>) --depth=1
cd fonts
./install.sh

安装完成后进入iTerm2设置字体

iTerm2->Preferences->Profiles->Text->Font  就可以设置字体了

四、命令高亮