Creating a copy of original theme file is the recommended way of tweaking original theme files. Oh-my-zsh docs
Check your existing theme:
$ echo $ZSH_THEME
robbyrussell
Create a copy of original theme file in your $ZSH_CUSTOM/themes
directory:
cp $ZSH/themes/robbyrussell.zsh-theme $ZSH_CUSTOM/themes/
Edit your custom copy of theme file
vim $ZSH_CUSTOM/themes/robbyrussell.zsh-theme
Which looks like this:
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
# ^ replace c with ~
Then source theme again:
exec zsh
It will now show the path relative to your home directory (~
). For example:
# BEFORE
➜ sqlboiler git:(master)
# AFTER
➜ ~/open-source/sqlboiler git:(master)
oh-my-zsh
? Correctly tagging the question would help bringing the right people to look at your question. – Jetta