Informative and fast Git prompt for any shell (Bash, Zsh, and PowerShell)
Go
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
color
prompt
.gitignore
.travis.yml
LICENSE
README.md
main.go

README.md

go-git-prompt

Build Status Coverage Status

Informative and fast Git prompt for any shell (Bash, Zsh, and PowerShell).

This project is inspired from oliviervedier's zsh-git-prompt.

Usage

Bash:

PS1='\w $(go-git-prompt) % '

Zsh:

PROMPT='%~ $(go-git-prompt) %% '

Fish:

function fish_prompt
   echo (go-git-prompt)" % "
end

PowerShell:

function prompt {
  write-host "$(pwd) " -nonewline
  write-host (go-git-prompt) -nonewline
  return "`n> "
}

Install

$ go get -v github.com/ubnt-intrepid/go-git-prompt

License

This software is released under the MIT license. See LICENSE for details.