📜  zsh 语法高亮插件 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:24.131000             🧑  作者: Mango

代码示例1
In your ~/.zshrc
Simply clone this repository and source the script:

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

Then, enable syntax highlighting in the current interactive shell:

source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
If git is not installed, download and extract a snapshot of the latest development tree from:

https://github.com/zsh-users/zsh-syntax-highlighting/archive/master.tar.gz
Note the source command must be at the end of ~/.zshrc.