- @conradbessant wouldn't that be really quite scary - as muscle cars tend not to like corners much?!?! in reply to conradbessant #
- @conradbessant clearly you've been watching too much Ashes to Ashes!
#fireupthequattro in reply to conradbessant # - Yum yum http://twitpic.com/b148o #
- RT @rvidal: Gigantic Spider Gobbles Bird in Front of Camera http://ff.im/-5xbL4 - oh my god that freaked me out!!!
# - RT @bffo: just out on BMC Bioinformatics: "An introduction to scripting in Ruby for biologists" http://tr.im/tDDX , also http://tr.im/tDGG #
- Left my wedding ring on the side in the bathroom this morning (damn my brain)… Cat is going to kill me…
# - @bffo lol! The one at home (with the wife)
in reply to bffo # - @conradbessant My old uni! in reply to conradbessant #
- @conradbessant looks like the road is empty in front of that Audi though! Accident? in reply to conradbessant #
- Introducing the worlds largest beer cooler http://twitpic.com/bl662 #
- Saved for later… http://twitpic.com/bl6kt #
Monthly Archive for July, 2009
- The new Sanger Mouse Resource Portal is now up! http://www.sanger.ac.uk/mouseportal/ - far too much javascript madness… #
- @ABarkell sweaty work? o_O in reply to ABarkell #
- I'm spending the weekend in Cambridge - anyone got any recommendations on things to do? Forecast is for rain… (punting is out
) # - Learning Perl the Hard Way http://ff.im/-5mnXo (via @nuin) #
- It's been a productive evening in the Oakley kitchen
http://yfrog.com/86u8qj # - @conradbessant just got out the wedding in fenn ditton. Will look out for ya while we find a pub to eat in
in reply to conradbessant # - Finally, food and beer, sitting in the weatherspoons
http://twitpic.com/arq5e #
EDIT: (12-Mar-2010) slight update to the svn prompt code to give a better / more useful output…
I’ve seen things like this posted on the net before but never really had a chance to play with the idea. But as I’m now using git and svn a lot more these days (fingers crossed i’ll be totally free of cvs soon!) I thought it was about time I pulled my finger out.
So here’s the end goal, in a normal directory, we just get a normal bash promt, but in a directory controlled by git or svn, we also get an addition telling us the source control tool in use and the current branch:

So, fire up yer terminal and add the following to your .profile, .bash_profile or .bashrc (whichever one you use):
parse_git_branch () { git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)# (git::\1)#' } parse_svn_branch() { parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk '{print " (svn::"$1")" }' } parse_svn_url() { svn info 2>/dev/null | sed -ne 's#^URL: ##p' } parse_svn_repository_root() { svn info 2>/dev/null | sed -ne 's#^Repository Root: ##p' } BLACK="\[\033[0;38m\]" RED="\[\033[0;31m\]" RED_BOLD="\[\033[01;31m\]" BLUE="\[\033[01;34m\]" GREEN="\[\033[0;32m\]" export PS1="$BLACK[ \u@$RED\h $GREEN\w$RED_BOLD\$(parse_git_branch)\$(parse_svn_branch)$BLACK ] "
Simples. Now just open up a new terminal and move into a project directory using svn or git.
Recent Comments