Last active
October 20, 2016 00:01
-
-
Save jonbartlett/2c4fe7b7fe69af4969ecebf85adf4847 to your computer and use it in GitHub Desktop.
Add SVN status to bash-git-prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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