ZSH 自用安装手册

Catálogo
  1. 1. ZSH 安装
  2. 2. ZSH 配置
  3. 3. ZSH 插件
    1. 3.1. zsh-autosuggestions

ZSH 安装

1
2
apt install -y git zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

ZSH 配置

Split the zshrc file into multiple files

1
2
3
4
5
6
7
# ~/.zshrc

# Load seperated config files
for conf in "$HOME/.config/zsh/config.d/"*.zsh; do
source "${conf}"
done
unset conf

ZSH 插件

zsh-autosuggestions

github link

1
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
~/.zshrc
1
2
3
4
plugins=( 
# other plugins...
zsh-autosuggestions
)

推荐配置

1
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#3f3f3f,bg=#8c8c8c,bold"