zsh 安装
sudo apt install zsh tmux
oh-my-zsh
安装 oh-my-zsh 配置 zsh.
github地址: https://github.com/ohmyzsh/ohmyzsh
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Plugins
安装一些好用的 zsh 插件。
zsh-autosuggestions
克隆仓库到本地 ~/.oh-my-zsh/custom/plugins 路径
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
在~/.zshrc 中添加
plugins=(
git
zsh-autosuggestions
)
autojump
sudo apt install autojump
在~/.zshrc 中添加
plugins=(
git
zsh-autosuggestions
autojump
)
安装成功后,打开/usr/share/doc/autojump/README.Debian文件,此文件是教你如何配置autojump的。
由于使用的shell是zsh,因此需要在.zshrc配置文件的最后一行加上. /usr/share/autojump/autojump.sh以使得autojump生效,最后再source ~/.zshrc重新编译zsh,此时autojump已经生效。
zsh-syntax-highlighting
命令语法高亮
安装
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
在 ~/.zshrc 文件中添加 zsh-syntax-highlighting,注意要写在最后。如:
plugins=( [plugins…] zsh-syntax-highlighting)
最终插件列表
plugins=(
git
tmux
autojump
zsh_reload
zsh-autosuggestions
colored-man-pages
zsh-syntax-highlighting
)
