Install

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# zsh
sudo apt install zsh
chsh -s $(which zsh)

# ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# p10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sed -i 's#robbyrussell#powerlevel10k/powerlevel10k#' ~/.zshrc

# plugin
sed -i 's/plugins=(git)/\
plugins=( \
git \
command-not-found \
colored-man-pages \
vi-mode \
zsh-autosuggestions \
zsh-syntax-highlighting \
)/' ~/.zshrc

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# z.lua
sudo apt install -y lua5.2
git clone https://github.com/skywind3000/z.lua.git ~/.z.lua
echo 'eval "$(lua ~/.z.lua/z.lua --init zsh once enhanced)"' >> ~/.zshrc

# 重启 zsh 并配置 p10k
exec zsh

Reference