Add this code to your .bash_login (or whichever config file it is that you use):
export PS1='\[\033[33;40m\]\@ \u@\h: \w$(parse_git_branch)>\[\033[0m\]'Then restart your terminal and you'll see the name of your curent git branch in parentheses after the path. It even adds a * to show that you're in a "dirty" state.
This
01:27 PM damoncali@macbookpro: ~/apps/ninthyard>
becomes
01:27 PM damoncali@macbookpro: ~/apps/ninthyard(master)>
or this, if you're in a dirty state
01:27 PM damoncali@macbookpro: ~/apps/ninthyard(master *)>
Sometimes it's the little things that make your day.

0 comments:
Post a Comment