A lightning fast terminal prompt including detailed Git status info
sh -c $(curl -fsSL https://github.com/j18e/shell-prompt/raw/master/install.sh)
alternatively, if you have golang set up:
go get github.com/j18e/shell-prompt
Add the following to your .bashrc
:
function _update_ps1() {
PS1="$(shell-prompt -exit-code $?)"
}
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
Add the following to your .zshrc
(you should be using oh-my-zsh):
PROMPT='$(shell-prompt -exit-code $? -zsh)'