记录Linux上ZSH
相关的配置,从仓库安装配置并配置相关的插件,美化终端使之更容易操作。使用二次开发的on-my-zsh
安装
zsh
,使用自带的包管理工具1
2
3apt install zsh # for Ubuntu
yum install zsh # for CentOS,dnf replace yum also
brew install zsh # MacOS安装
on-my-zsh
,克隆oh-my-zsh仓库或者使用安装脚本1
wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh
配置
zsh
,修改主题以及添加插件zsh-syntax-highlighting
,zsh-autosuggestions
1
2
3
4vim ~/.zshrc # root
ZSH_THEME="robbyrussell" # change, like "ys"
plugins=(git zsh-syntax-highlighting zsh-autosuggestions) # search plugins and add
source ~/.bash_profile-
1
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
-
1
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
-
刷新zsh配置,配置完成
1
source ~/.zshrc