parm530
11/16/2017 - 1:58 AM

Installing zhs

Shortcut for switching from bash to zsh

Installing oh-my-zsh

  • INSTALL ITERM2!
  • Run the command from the terminal, make sure you have xcode and iterm2 installed!
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Replacing Bash With Zsh

  • check to see if zsh was really installed: zsh --version, should say zsh 5.1.1 or higher!
  • Run command in terminal to change SHELL, make sure to restart iterm2!!!
$ chsh -s /bin/zsh
  • Run sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" to install oh-my-zsh
  • Run echo $SHELL, should output /bin/zsh

Custom theme:

  • Open the .zshrc file, locate the environment variable: ZSH_THEME="suvash"

Customizing Alias

  • You are not supposed to edit your .zshrc file!
  • It is only for the main settings!
  • If you want to add custom things (like aliases, functions, etc), then you should create a new file.zsh in /Users/<you>/.oh-my-zsh/custom/
  • Create aliases.zsh for aliases and functions.zsh for your functions
  • Add alias rz='source ~/.zshrc' in to the custom file!