News for hackers. Stuff that matters.
Re:Display your current git branch as part of your bash prompt by zain on Sunday August 16, 2009 @09:37PM (#767157)
Cool! I've practically created my own framework in Bash to hack my prompt but I never thought about sharing it.

My prompt shows the git branch, svn revision, and active virtualenv ("workon" and "deactivate" are virtualenv commands in the screenshot below). Also, mine has COLORS! (Colors within the dynamic function are much harder than they sound)

Here's a quick screenshot: http://img.skitch.com/20090817-gtp7bgkmdn14j84ryhepa2edke.pn...

You can extend it pretty easily to show whatever you want by doing little more than adding another function. Throw this into ~/.profile if you want to try it: http://pastebin.com/f79a9af51

There are no comments on this comment yet.