For a while I have been using a Bash Terminal Prompt which is normally green but turns red if the last process failed. I have just discovered a prompt which includes the current git branch and I have updated my prompt to include both of these functions.
My terminal prompt now looks like the following screen capture (I’m currently using the Solarized Light theme):
You can add the following snippet to your .bash_profile
, .profile
or .bashrc
file to get the same prompt:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
The most up-to-date version of this prompt is available as a Gist at https://gist.github.com/4122721