我的终端环境一直是用的zsh + oh-my-zsh + zsh-syntax-highlighting + zsh-autosuggestions + powerlevel10k的配置。安装很简单,这里直接把shell放在一起方便复用。

Install

安装前的准备:你需要安装好git,并配置好git、apt、wget的代理或镜像源设置。

为配合powerlevel10k的shell主题最好设置终端字体,详见 https://github.com/romkatv/powerlevel10k#Fonts

1
2
3
4
5
6
7
8
sudo apt install zsh -y
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
# chsh -s /bin/zsh
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sed -i 's/ZSH_THEME=".*"/ZSH_THEME="powerlevel10k\/powerlevel10k"/g' ~/.zshrc
sed -i 's/plugins=(\(.*\))/plugins=(\1 zsh-syntax-highlighting zsh-autosuggestions)/' ~/.zshrc
2022-09-13
Contents
  1. Install

⬆︎TOP