This blog has been archived. Our writing has moved to makandra cards.
The blog of , a Ruby on Rails development team

Tip: Highlight your prompt on production machines

Next in our series on not shooting yourself in the foot: Doing a sudo shutdown -h now on the main database server right before you head home to cook dinner for six.

When you're distracted, all shells look alike. So make it look different! I like to color my prompt in a bright red on all production machines I frequent. You can achieve this by adding this line to your your ~/.bashrc:

PS1='${debian_chroot:+($debian_chroot)}\[\033[41;33m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Now relog or do a source ~/.bashrc to see your dangerous new prompt. I also recommend coloring root's prompt for the occasional su power trip.

Growing Rails Applications in Practice
Check out our e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Recent posts

Our address:
makandra GmbH
Werner-von-Siemens-Str. 6
86159 Augsburg
Germany
Contact us:
+49 821 58866 180
info@makandra.de
Commercial register court:
Augsburg Municipal Court
Register number:
HRB 24202
Sales tax identification number:
DE243555898
Chief executive officers:
Henning Koch
Thomas Eisenbarth