0%

Oh My Zsh 「安装 & 配置」

Oh My Zsh是一款社区驱动的命令行工具。它基于zsh命令行,提供了主题配置,插件机制,已经内置的便捷操作。给我们一种全新的方式使用命令行。Oh My Zsh官网:https://ohmyz.sh

安装

Curl安装:
使用国内镜像安装:

sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"

wget安装:
使用国内镜像安装:

sh -c "$(wget -O- https://gitee.com/pocmon/mirrors/raw/master/tools/install.sh)"

配置iterm2命令自动提示

1.切换到Oh My ZshPlugin目录下,下载插件:

$ cd ~/.oh-my-zsh/plugins/
$ git clone https://github.com/zsh-users/zsh-autosuggestions

2.编辑隐藏文件~/.zshrc,找到plugins=(git)一行,添加下边的代码:

plugins=(git zsh-autosuggestions)

3.让~/.zshrc配置生效。执行命令:source ~/.zshrc

至此,自动提示的插件也就安装完成啦。