-
Enabel vsCode to open files from the command line, install extension 'Shell Command: Install 'code' command in PATH command' https://stackoverflow.com/questions/29963617/how-to-call-vs-code-editor-from-command-line
-
Open ~/.zshrc in vsCode
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~'
}