zsh 配置
安装 zsh
安装 Oh My ZSH!
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
安装主题
bash -c "$(curl -fsSL https://raw.githubusercontent.com/skylerlee/zeta-zsh-theme/master/scripts/install.sh)"
https://github.com/skylerlee/zeta-zsh-theme
安装插件
autojump
# arch
yay -S autojump
# centos
sudo yum install autojump-zsh
https://blog.csdn.net/I_lost/article/details/85219186
命令行高亮显示(zsh-syntax-highlighting)
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
历史命令记录(zsh-autosuggestions)
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
启用 Oh My ZSH!
cp $ZSH/templates/zshrc.zsh-template ~/.zshrc
vi ~/.zshrc
ZSH_THEME="zeta"
# z 命令快速跳转目录
# extract x 命令解压一切文件
# wd 常用目录切换工具
# wd add web
# 这个命令相当于给当前目录做了一个标识,标识名叫做 web ,我们下次如果再想进入这个目录,只需输入:
# wd web
# 这样就可以完成目录切换了,非常方便。
plugins=(autojump extract git wd z zsh-syntax-highlighting zsh-autosuggestions)
which zsh
# /usr/bin/zsh
sudo vi /etc/passwd
# 用户名:/usr/bin/zsh
重新打开终端查看效果