How can I make my Mac terminal look like the screenshot below? The input line is cool and seems useful.

enter image description here

link|improve this question
Belongs on superuser.com – Binary Worrier Aug 27 '09 at 13:21
feedback

migrated from stackoverflow.com Aug 27 '09 at 13:44

This question came from our site for professional and enthusiast programmers.

2 Answers

You mean the prompt line? That is done by setting the PS1 environment variable in the .bashrc file (or .bash_profile) in your home directory.

See: http://beckism.com/2009/02/better%5Fbash%5Fprompt/

link|improve this answer
lynda.com has a decent lesson on configuring BASH profiles in their Mac UNIX video tutorial. it's not free, but the OP might find it interesting – username Oct 15 '11 at 11:22
feedback

It seems that the guy in the picture you sent uses Rails and GIT. If you are using git, you should download GIT Bash Completition to and change your .bash_profile, including this 2 lines:

source ~/.git-completion.bash
export PS1='\[\033[38m\]\u@\h\[\033[01;34m\] \w \[\033[31m\]`git branch 2> /dev/null | grep \* | head -1 |  sed "s/\* //g" | awk "{ print \"(\" \\\$1 \")\" }"`\[\033[29m\]$\[\033[00m\] '

With this you will have a nice prompt, which tells you what branch you are.

link|improve this answer
1  
Actually the Git completion file provides a ready-made item to export into PS1. They suggest this, for example, PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' – Telemachus Aug 27 '09 at 14:20
feedback

Your Answer

 
or
required, but never shown