跳到主要内容

Zsh 配置

apt install zsh git

git clone --depth 1 https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git
cd ohmyzsh/tools
REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git sh install.sh

常用插件配置:

#!/bin/bash
ZSH_CUSTOM="$HOME/.oh-my-zsh/custom"
export ZSH_CUSTOM

# Configure plugins.
git clone --depth=1 https://gitee.com/mirrors/zsh-syntax-highlighting.git "${ZSH_CUSTOM}"/plugins/zsh-syntax-highlighting
git clone --depth=1 https://gitee.com/mirrors/zsh-autosuggestions.git "${ZSH_CUSTOM}"/plugins/zsh-autosuggestions
sed -i 's/^plugins=.*/plugins=(git\n extract\n sudo\n jsontools\n colored-man-pages\n zsh-autosuggestions\n zsh-syntax-highlighting\n)/g' ~/.zshrc