Zuletzt aktiv 6 months ago

Änderung ddaed6230caca41231483dafd2a0796fdadbc544

install_ohmyzsh.sh Originalformat
1#!/bin/bash
2
3yum install git zsh bash-completion wget unzip tree tmux vim sysstat -y -q &> /dev/null || true
4
5# install oh-my-zsh
6git clone https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git
7REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git sh ohmyzsh/tools/install.sh && rm -rf ohmyzsh
8
9ZSH=$HOME/.oh-my-zsh
10# install zsh-syntax-highlighting
11# git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
12git clone https://mirrors.nju.edu.cn/git/zsh-syntax-highlighting.git $ZSH/custom/plugins/zsh-syntax-highlighting
13# echo "source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
14
15# install zsh-autosuggestions
16# git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
17git clone https://mirrors.nju.edu.cn/git/zsh-autosuggestions.git $ZSH/custom/plugins/zsh-autosuggestions
18# echo "source $ZSH_CUSTOM/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
19
20# replace plugins and theme
21cp $HOME/.zshrc $HOME/.zshrc.bak
22zsh -c 'source ~/.zshrc && omz plugin enable zsh-autosuggestions zsh-syntax-highlighting sudo'
23zsh -c 'source ~/.zshrc && omz theme set ys'
24# sed -i 's/(git/(git zsh-syntax-highlighting zsh-autosuggestions sudo/g' ~/.zshrc
25# sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="ys"/g' ~/.zshrc
26
27cat >> ~/.zshrc <<UK
28
29## add
30zstyle ':omz:update' mode disabled
31HIST_STAMPS="yyyy-mm-dd"
32alias vi="vim"
33UK