I'm looking for theme to display a full path + git (branch name + uncommitted changes + added files). Didn't find any. something like this:
/full/path/to/repo (master *+)
would love a recommendation of one / a tip of how to edit an existing one (I am currently using Godzilla).
To get the full path path of your current working directory use %d . I'm assuming you're using oh-my-zsh. In order to accomplish what you want, you can create a modified version of the Godzilla theme and replace the %c (which just shows the current folder) with %d in the PROMPT .
To change the Theme, simply change the ZSH_THEME value in ~/. zshrc file from robbyrussell to Avit. Run the following command to update the config. Open ITerm2 > Preferences > Profiles > Colors and change the background black color to use 20% gray as shown below.
You can use prompt -c which will print the current theme.
You can modify the second line of this file:
~/.oh-my-zsh/themes/robbyrussell.zsh-theme
Which looks like this:
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' # ^ replace c with ~
Then source theme again:
source ~/.zshrc
It will now show the path relative to your home directory (~
). For example:
# BEFORE ➜ sqlboiler git:(master) # AFTER ➜ ~/open-source/sqlboiler git:(master)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With