gitstatus - Makes it easy to show your git status in your prompt.

gitstatus - Makes it easy to show your git status in your prompt.


gitstatus is a plugin made for prompts - it tells you how many things have changed since the last git commit in a repository.

Example with PS1='%F{blue}%~%F{default} $(gitstatus -i)%F{green}$%F{default} ':

Why such a thing?

Frankly, it's because I needed something small and fast that would integrate well with my (multi-line) prompt.

Is it useful? For me and probably a handful other people, yes.

Getting Started


  • zsh
  • git
  • awk



Clone this repository locally, on your machine, for example:

git clone "" gitstatus
source /path/to/installation/gitstatus.plugin.zsh

And of course, remember to replace /path/to/installation with the actual path to the program.

With a plugin manager

You could also use a plugin manager, such as zpm:

zpm load xylous/gitstatus


Change your prompt to include $(gitstatus) wherever you need. Note that you'll need to setopt PROMPT_SUBST and that you're going to need to use single quotes.

So, for example:

PROMPT='%F{blue}%~%F{default} $(gitstatus -i)$ '


  • -i: use if your prompt is inline. It appends a whitespace character if the output is non-empty; the formatting will always be proper, even if outside a git repository.


  • add screenshots
  • have better support for inline prompts
  • cover more git status flags


Pull requests and issues are welcome.

Download Source Code

Download ZIP
Apr 12, 2022