-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzshconfig.sh
More file actions
executable file
·28 lines (24 loc) · 862 Bytes
/
zshconfig.sh
File metadata and controls
executable file
·28 lines (24 loc) · 862 Bytes
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
#!/bin/bash
# This program changes the default shell to zsh and applies my configuration in
# configs/.zshrc
set -e
# Install Oh-My-ZSH
if [ ! -d $HOME/.oh-my-zsh ]; then
if command -v wget; then
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
elif command -v curl; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
else
echo "Please install wget or curl"
return -1
fi
else
echo "Oh-my-zsh already downloaded"
fi
# Changes shell to zsh
# Taken from https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH#installing-zsh
chsh -s $(which zsh)
# Copies over zsh config file
cp configs/.zshrc $HOME/.zshrc
echo "The zsh settings have been applied."
echo "Open a new terminal to use zsh. You may have to log out and back in again."