Oh-my-zsh安装

Oh-my-zsh安装及扩展插件安装

安装 zsh

1
2
cat  /etc/shells
chsh -s /bin/zsh

下载gitee

wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh

编辑

install.sh

找到以下部分

1
2
3
4
5
# Default settings
ZSH=${ZSH:-~/.oh-my-zsh}
REPO=${REPO:-ohmyzsh/ohmyzsh}
REMOTE=${REMOTE:-https://github.com/${REPO}.git}
BRANCH=${BRANCH:-master}

1
2
REPO=${REPO:-ohmyzsh/ohmyzsh}
REMOTE=${REMOTE:-https://github.com/${REPO}.git}

替换为

1
2
REPO=${REPO:-mirrors/oh-my-zsh}
REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}

修改仓库地址

1
2
3
cd ~/.oh-my-zsh
git remote set-url origin https://gitee.com/mirrors/oh-my-zsh.git
git pull

插件 zsh-syntax-highlighting

高亮语法

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

插件 zsh-autosuggestions

自动补全

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