Bash prompt
Posted 29 July 2008, 10:57. (Filed under: Geek by Andrew)
I always forget how to make my bash prompt just the way I like it, so here it is for posterity. In ~/.bashrc:
PS1='\[\e]2;\u@\H \w\a\]\[\e[32m\][\t] \[\e[33m\]\w\[\e[0m\]\n\$ '
This gives me a prompt like this with the time and path:
[11:00:48] ~/code/database_info$ And a terminal title like this:
username@host path
Here’s the long guide to the codes, and here’s the one I use from IBM.
* * *
< Dropbox Beta invitations |
| Sterilising water for feeding babies - is boiling enough? >