Skip to content

Instantly share code, notes, and snippets.

@GraySmith00
Last active April 4, 2018 18:53
Show Gist options
  • Save GraySmith00/cbd315b405e22707212b73f3f824999c to your computer and use it in GitHub Desktop.
Save GraySmith00/cbd315b405e22707212b73f3f824999c to your computer and use it in GitHub Desktop.

Customizing Terminal to use Zsh (including VS Code Terminal)

code ~/.zshrc
  • Check current version of Zsh
zsh --version

https://github.com/robbyrussell/oh-my-zsh

  • Install if out of date or doesn't exist, change default shell to zsh
  • Change default:
chsh -s $(which zsh)

https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH

  • change theme in .zshrc file
ZSH_THEME="robbyrussell"
  • if you're getting this error at the top 'etc/zprofile:source:2: not enough arguments' ohmyzsh/ohmyzsh#2162
  • Try this:
sudo nano /etc/zprofile
  • delete the line that says "source" and nothing else, then save.

  • in VS code user settings, change 'terminal.integrated.shell.osx' to zsh:

"terminal.integrated.shell.osx": "zsh"
  • change it so it only shows the current directory, at the end of your .zshrc file put (only works on some themes):
prompt_dir() {
  prompt_segment '%1~'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment