Skip to content

Instantly share code, notes, and snippets.

@barelyhuman
Created April 30, 2021 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barelyhuman/f8b9c15236f0aab8485ab6a9062e1ac8 to your computer and use it in GitHub Desktop.
Save barelyhuman/f8b9c15236f0aab8485ab6a9062e1ac8 to your computer and use it in GitHub Desktop.
my zsh base setup
#!/bin/zsh
if [ ! -d ~/.oh-my-zsh ]; then
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
if ! command -v git &> /dev/null
then
echo "git wasn't found, install it"
exit
fi
mkdir -p "$HOME/.zsh"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/sindresorhus/pure.git "$HOME/.zsh/pure"
# setup pure prompt
echo "fpath+=('$HOME/.zsh/pure')" >> ~/.zshrc
echo "autoload -U promptinit; promptinit" >> ~/.zshrc
echo "prompt pure" >> ~/.zshrc
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME=""/g' ~/.zshrc
# replace plugins to have zsh autosuggestions added
sed -i 's/"plugins=("/"plugins=(zsh-autosuggestions "/g' ~/.zshrc
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.zshrc
## setup node
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 12
nvm install 14
nvm alias default 12
echo "source ~/.nvm/nvm.sh" >> ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment