Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

enter image description here

share|improve this question

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

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

add comment

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/

share|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
add comment

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.

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.