Oh My Zsh 配置
安装 Oh My Zsh
安裝 Zsh
sudo apt install zsh # Ubuntu/Debian
brew install zsh # macOS
安装 Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
安装插件
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 中激活插件:
plugins=( [其他 plugin...] zsh-syntax-highlighting) # zsh-syntax-highlighting 必须放在最后
zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
在 ~/.zshrc 中激活插件:
plugins=( [其他 plugin...] zsh-autosuggestions)
zsh-proxy
git clone https://github.com/sukkaw/zsh-proxy.git ~/.oh-my-zsh/custom/plugins/zsh-proxy
在 ~/.zshrc 中激活插件:
plugins=( [其他 plugin...] zsh-proxy)
z 和 extract
plugins=( [其他 plugin...] z extract)
z 插件可以快速跳转最近访问过的目录:
z myfolder
extract 插件可以自动解压文件:
x myarchive.tar.gz
Zsh 主题 Powerlevel10k
克隆 Powerlevel10k 存储库:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
在 ~/.zshrc 中更改主题设置:
ZSH_THEME="powerlevel10k/powerlevel10k"
下载并安装字体 MesloLG Nerd Font:
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/Meslo.zip
mkdir fonts && unzip Meslo.zip -d fonts
mv fonts/*.ttf ~/.local/share/fonts
打开终端设置,启用 Custom font 并设置为 MesloLGM Nerd Font Mono


浙公网安备 33010602011771号