zsh-syntax-highlighting

平常用的ls、cd 等命令输入正确会绿色高亮显示,输入错误会显示其他的颜色。
安装

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

在 ~/.zshrc 中配置

plugins=(其他的插件 zsh-syntax-highlighting)

使配置生效

source ~/.zshrc

zsh-autosuggestions

输入命令时,会给出建议的命令(灰色部分)按键盘 tab 补全
安装

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

在 ~/.zshrc 中配置

plugins=(其他的插件 zsh-autosuggestions)

使配置生效

source ~/.zshrc

git-open

在终端里打开当前项目的远程仓库地址
安装

git clone https://github.com/paulirish/git-open.git $ZSH_CUSTOM/plugins/git-open

在 ~/.zshrc 中配置

plugins=(其他的插件 git-open)

使配置生效

source ~/.zshrc

在命令行输入 git-open 就可以在浏览器中自动打开仓库地址了

bat 代替 cat

cat 某个文件,可以在终端直接输出文件内容,bat 相比 cat 增加了行号和颜色高亮 👍

brew install bat
0条评论 顺序楼层
请先登录再回复