Search code examples
zshiterm2iterm

Iterm2: hide hostname and git branch


I use iterm2 and oh-my-zsh.

How can i hide hostname and git branch name?


Solution

    1. open ~/.zshrc, search keyword ZSH_THEME= and find the theme that you are using.
    2. open the theme file from ~/.oh-my-zsh/themes/ and override the Git and Hostname variables to what you want, you can also modify the color to make the git not showing this shining.
    3. save the changes and execute source ~/.zshrc to let the modification take into effect.