-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_zsh.sh
36 lines (26 loc) · 1.17 KB
/
init_zsh.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# init
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get -y install git
sudo apt-get -y install curl
sudo apt-get -y install vim
# install zsh
sudo apt-get -y install zsh
sudo chsh -s $(which zsh) && zsh
# install oh-my-zsh
sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# source ~/.zshrc
# auto suggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# auto jump
git clone https://github.com/wting/autojump.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/autojump && cd ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/autojump && python3 install.py&& cd
# syntax highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
echo "source ${ZSH_CUSTOM}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
# add plugin
echo "plugins=(git zsh-autosuggestions autojump)" >> ${ZDOTDIR:-$HOME}/.zshrc
# theme
echo "ZSH_THEME"="\"agnoster\"" >> ${ZDOTDIR:-$HOME}/.zshrc
# restart shell
source ${ZDOTDIR:-$HOME}/.zshrc
zsh