zsh配置
安装
安装zsh
sudo apt-get install zsh
或者已经安装了,查看
/usr/bin/zsh
安装oh-my-zsh
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
主题
默认的robbyrussell
主题就已经很不错啦。 agnoster
也还行,就是字符显示有时有问题。修改后, 生效:
source ~/.zshrc
插件
zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Ref:
zsh-completions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
Ref:
zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Ref:
zsh-history-substring-search
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
Ref:
记得要在~/.zshrc
更新: (如果没有.zshrc这个文件, 运行一下zsh即可)
plugins=(git git-extras yarn zsh-completions zsh-syntax-highlighting zsh-autosuggestions zsh-history-substring-search)
autoload -U compinit && compinit
然后执行生效:
source ~/.zshrc