Improved zsh installation steps
This commit is contained in:
parent
f2a6c2e87d
commit
b87b7c6cd1
1 changed files with 32 additions and 10 deletions
|
@ -1,17 +1,39 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo " - Installing Zsh - "
|
echo "🤔 Checking for Zsh installation"
|
||||||
sudo apt-get install zsh
|
if zsh --version; then
|
||||||
|
echo "🥰 Zsh is already installed"
|
||||||
|
else
|
||||||
|
echo "🤩 Installing Zsh"
|
||||||
|
sudo apt-get install zsh
|
||||||
|
echo "👍 Zsh Installed"
|
||||||
|
fi
|
||||||
|
|
||||||
echo " - Setting Zsh as default - "
|
echo "🦄 Setting Zsh as default shell"
|
||||||
sudo chsh -s /usr/bin/zsh
|
sudo chsh -s /usr/bin/zsh
|
||||||
|
echo "👍 Zsh set as default shell, will take effect next time you log in (or type zsh into your terminal)"
|
||||||
|
|
||||||
echo " - Installing oh-my-zsh - "
|
echo "🤔 Checking for oh-my-zsh installation"
|
||||||
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
if [ -d ~/.oh-my-zsh ]; then
|
||||||
|
echo "🥰 oh-my-zsh is already installed"
|
||||||
|
else
|
||||||
|
echo "🤩 Installing oh-my-zsh"
|
||||||
|
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||||
|
echo "👍 oh-my-zsh Installed"
|
||||||
|
fi
|
||||||
|
|
||||||
echo " - Setting oh-my-zsh theme -"
|
echo "🤔 Checking for zsh-autosuggestions installation"
|
||||||
|
if [ -d ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions ]; then
|
||||||
|
echo "🥰 zsh-autosuggestions is already installed"
|
||||||
|
else
|
||||||
|
echo "🤩 Installing zsh-autosuggestions"
|
||||||
|
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||||
|
sed -ri 's/plugins=\((.*?)\)/plugins=\(git zsh-autosuggestions\)/g' ~/.zshrc
|
||||||
|
echo "👍 zsh-autosuggestions Installed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "🦄 Setting oh-my-zsh theme"
|
||||||
sed -ri 's/ZSH_THEME="(.*?)"/ZSH_THEME="kardan"/g' ~/.zshrc
|
sed -ri 's/ZSH_THEME="(.*?)"/ZSH_THEME="kardan"/g' ~/.zshrc
|
||||||
source ~/.zshrc
|
echo "👍 Set oh-my-zsh theme"
|
||||||
|
|
||||||
echo " - Setting up Zsh Plugins - "
|
source ~/.zshrc
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
echo "👍 Sourced updated zshrc"
|
||||||
sed -ri 's/plugins=\((.*?)\)/plugins=\(git zsh-autosuggestions\)/g' ~/.zshrc
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue