Zsh
Install and setup Zsh
Install
Install Zsh.
brew install zshInstall Oh My Zsh.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"Upgrade it.
upgrade_oh_my_zshChange theme
Edit the config file.
nano ~/.zshrcReferences
https://github.com/robbyrussell/oh-my-zsh/issues/1906#issuecomment-252443982
Change theme.
#ZSH_THEME="robbyrussell"
ZSH_THEME="agnoster"Reload the config.
source .zshrcReferences
https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
Install fonts
Run.
git clone https://github.com/powerline/fonts.git
cd fonts
./install.shChange your iTermr2 font to Meslo LG L for Powerline.
Fixes
Autocomplete
Put these two lines at the end of my .zshrc
autoload -Uz compinit
compinitSlow cd to git folder
git config --add oh-my-zsh.hide-status 1
git config --add oh-my-zsh.hide-dirty 1Shorten path
Edit your theme confi file.
cd ˜/.oh-my-zsh/themes/
vi agnoster.zsh-themeEdit the file as follows.
prompt_dir() {
#prompt_segment blue $CURRENT_FG '%~'
prompt_segment blue $CURRENT_FG '%2~'
}Apply changes.
source ˜/.zshrcUpdate ZSH after the change
cd ~/.oh-my-zsh
git stash
upgrade_oh_my_zsh
git stash popReferences
https://medium.com/@shandou/how-to-shorten-zsh-prompt-oh-my-zsh-14185f3e7ab7
Last updated