1.
2.
下载码云安装包
wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh chmod 777 install.sh
3.
编辑install.sh 找到以下部分
ZSH= Z S H : − / . o h − m y − z s h R E P O = {ZSH:-~/.oh-my-zsh} REPO= ZSH:− /.oh−my−zshREPO={REPO:-ohmyzsh/ohmyzsh}
REMOTE=KaTeX parse error: Expected ‘}’, got ‘EOF’ at end of input: …s://github.com/{REPO}.git}
BRANCH=${BRANCH:-master}
把
REPO= R E P O : − o h m y z s h / o h m y z s h R E M O T E = {REPO:-ohmyzsh/ohmyzsh} REMOTE= REPO:−ohmyzsh/ohmyzshREMOTE={REMOTE:-https://github.com/${REPO}.git}
替换为
REPO= R E P O : − m i r r o r s / o h − m y − z s h R E M O T E = {REPO:-mirrors/oh-my-zsh} REMOTE= REPO:−mirrors/oh−my−zshREMOTE={REMOTE:-https://gitee.com/${REPO}.git}
sed -i 's/REPO=\${REPO:-ohmyzsh\/ohmyzsh}/REPO=\${REPO:-mirrors\/oh-my-zsh}/' install.sh sed -i 's/github.com/gitee.com/' install.sh
4.
启动
bash install.sh
5.
6.
安装插件
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
7.
启动
source ~/.zshrc
整合
#安装依赖 #apt install -y zsh #apt install -y git yum install -y zsh yum install -y git #下载脚本 wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh chmod 777 install.sh #替换源 sed -i 's/REPO=\${REPO:-ohmyzsh\/ohmyzsh}/REPO=\${REPO:-mirrors\/oh-my-zsh}/' install.sh sed -i 's/github.com/gitee.com/' install.sh #安装ohmyzsh bash install.sh #修改配置文件 可能失效 cat>~/.zshrc<
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/216189.html原文链接:https://javaforall.net
