#!/bin/bash # root 专用 sudo apt-get update sudo apt-get install -y zsh git # 公用 rm -rfv ~/.oh-my-zsh REMOTE=https://gitee.com/mirrors/oh-my-zsh.git RUNZSH="no" sh -c "$(wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh -O -)" # REMOTE=https://gh.tj20.top/https://github.com/ohmyzsh/ohmyzsh.git RUNZSH="no" sh -c "$(wget https://gh.tj20.top/https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" echo modify ~/.zshrc sed -i 's|# export PATH=$HOME/bin:/usr/local/bin|export PATH=$HOME/bin|g' ~/.zshrc sed -i 's/^\s*ZSH_THEME="robbyrussell"/# ZSH_THEME="robbyrussell"\nZSH_THEME="agnoster"/g' ~/.zshrc sed -i 's/^\s*plugins=\(.*\)/plugins=\(git z extract\)\n# plugins=\(git z extract docker docker-compose\)/g' ~/.zshrc # sed -i 's/^\s*plugins=\(.*\)/plugins=\(git z extract docker docker-compose\)/g' ~/.zshrc # docker # zsh (anon):12: character not in range # sed -i 's|^\s*source \$ZSH/oh-my-zsh.sh|export LC_ALL=C.UTF-8\nexport LANG=C.UTF-8\n\nsource \$ZSH/oh-my-zsh.sh|g' ~/.zshrc echo 'Starting zsh ...' zsh -l