tools/install-oh-my-zsh.sh
2022-12-21 15:43:05 +00:00

20 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# sh -c "$(wget -qO- http://tj20.top:3000/chinky/tools/raw/branch/master/install-oh-my-zsh.sh)"
# 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