Skip to content

Instantly share code, notes, and snippets.

@danrspencer
Last active August 31, 2023 14:41
Show Gist options
  • Save danrspencer/f60a980dc5e212574292656ae4e638ee to your computer and use it in GitHub Desktop.
Save danrspencer/f60a980dc5e212574292656ae4e638ee to your computer and use it in GitHub Desktop.
Setting up shell on new machine
#!/usr/bin/env bash
# Setup the dev volume: https://brianboyko.medium.com/a-case-sensitive-src-folder-for-mac-programmers-176cc82a3830
set -e
# Install Brew
# https://brew.sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install ZSH
# https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#how-to-install-zsh-on-many-platforms
brew install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Install Plugins
# https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh
git clone -- depth 1 --https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
omz plugin enable zsh-autosuggestions
git clone --depth 1 --https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
omz plugin enable fast-syntax-highlighting
git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git $ZSH_CUSTOM/plugins/zsh-autocomplete
omz plugin enable zsh-autocomplete
# Install NerdFont
# https://github.com/Homebrew/homebrew-cask-fonts
brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font
# Change font in iTerm (Perferences > Profiles > Test > Font)
# Install Starship
brew install starship
echo '
# Enable Starship
eval "$(starship init zsh)"' >> ~/.zshrc
# Setup Starship
echo "
[gcloud]
disabled = true
[kubernetes]
symbol = ''
disabled = false" > ~/.config/starship.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment