mac自帶的terminal是比較簡陋的,zsh簡直就是最好的救葯。可以通過插件的方式來自動匹配命令,提高效率。還可以配置語法高亮,輸錯時會顯示紅色。
第一步,進入 zsh 插件目錄,並 clone 項目到此目錄中:
cd "$ZSH_CUSTOM/plugins" git clone https://github.com/zsh-users/zsh-syntax-highlighting.git git clone https://github.com/zsh-users/zsh-autosuggestions.git
其他的也能去 https://github.com/zsh-users 這里找
第二步,配置 .zshrc 文件
... 上面省略 plugins = (git zsh-autosuggestions zsh-syntax-highlighting) ... 下面省略
最后一步,讓配置生效
zsh
或者
source ~/.zshrc
