zsh theme for full path + display git changes

Ohad Perry picture Ohad Perry · Jan 11, 2015 · Viewed 33.4k times · Source

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).

Answer

mcls picture mcls · Jan 15, 2015

Run man zshmisc and search for the SIMPLE PROMPT ESCAPES section. This documents escapes which can be used to theme your prompt.

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.

See here: https://github.com/robbyrussell/oh-my-zsh/blob/c78277fd8bda5fec87504469afdf121355876006/themes/gozilla.zsh-theme#L1