Skip to content

Instantly share code, notes, and snippets.

@jonbartlett
Last active October 20, 2016 00:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonbartlett/2c4fe7b7fe69af4969ecebf85adf4847 to your computer and use it in GitHub Desktop.
Save jonbartlett/2c4fe7b7fe69af4969ecebf85adf4847 to your computer and use it in GitHub Desktop.
Add SVN status to bash-git-prompt
# Add the following function to gitprompt.sh
# via http://csnipp.com/s/191/-Git-and-SVN-Status-in-the-Bash-Prompt
function prompt_callback {
local DIRTY REV=$(svn info 2>/dev/null | grep Revision | sed -e 's/Revision: //')
[ "$REV" ] || return
[ "$(svn st)" ] && DIRTY=' *'
echo "(r$REV$DIRTY)"
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment