Cool colours and GitHub branch in Terminal
There are many posts out there about making terminal have nice colours and getting it to display your projects GitHub branch. So l thought l would post mine
Here is what my terminal looks like.

Yes l am using Ryan Bates railscasts as my sample project (Thanks Ryan). As you can see it has the username@machine and then if you are in a project running git is also has the branch.
All you need to do it add the following to either your bash_login or bash_profile depending on what you are using. So first you run
mate ~/.bash_login
I am using textmate to edit this file. Once there simple add the following
export CLICOLOR=1
export TERM=xterm-color
export LSCOLORS=gxfxcxdxbxegedabagacad # cyan directories
export PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ \`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`\[\033[37m\]$\[\033[00m\] "
Save the file and reload your bash like so and you are good to go enjoy.
. ~/.bash_login
Of course you can change the colour of the font but ill leave that to you
Moving to anywhere on a line in terminal on Mac OSX
If your like me and use terminal on you mac you might find yourself wanting to move to a point on the line you just typed. Well there is a simple way that l know at least. Just press and hold the “Option” key and click your mouse anywhere on the line and your cursor will move there.
I know there might be a better way without going back to the evil mouse but, l just don’t know it.




