Mac 配置 oh-my-zsh 和命令行自动补全
一、把 oh-my-zsh 下载到本地#
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
二、复制 .zshrc#
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
三、更改你的默认 shell#
chsh -s /bin/zsh
四、然后重启终端,你会发现你的命令行变了#
五、配置命令自动补全的插件#
①、下载该插件到 oh-my-zsh 的插件目录#
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
②、编辑 .zshrc 文件#
vim ~/.zshrc
③、找到 plugins=(git) 这一行,如果没有添加。更改为如下#
plugins=(git zsh-autosuggestions)
④、重启 zsh#
source ~/.zshrc
然后重启终端就可以享用命令行补全功能了
本作品采用《CC 协议》,转载必须注明作者和本文链接
推荐文章: