安装zsh配置oh-my-zsh和自动补全插件
Linux学习笔记
Centsos 安装zsh配置oh-my-zsh和自动补全工具* 查看当前shell
echo $SHELL
- 安装zsh
yum install -y zsh
- 切换默认shell
chsh -s /bin/zsh
- 安装git
yum install -y git
- 安装oh-my-zsh
- 自动安装
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- 手动安装
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
- 复制配置文件
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
- 修改主题
vim .zshrc 修改ZSH_THEME="ys”
- 安装自动补全插件
官网:Incremental completion on zsh
wget -O incr-0.2.zsh https://mimosa-pudica.net/src/incr-0.2.zsh
- 复制incr*.zsh文件到plugins
cp incr-0.2.zsh .oh-my-zsh/plugins/
- 在.zshrc 文件末尾添加下面这行
source ~/.oh-my-zsh/plugins/incr*.zsh
- 重新打开终端,以使配置生效