News for hackers. Stuff that matters.
Re:How I Fired Myself by hollerith on Wednesday February 27, 2013 @11:45AM (#5293255)
To avoid mistakes like that is why I put the hostname and only the hostname plus one character in my shell prompt.

(The other character is a # or $ depending on whether the user is root or not.)

Re:How I Fired Myself by protomyth on Wednesday February 27, 2013 @12:08PM (#5293403)
At one job I went with this scheme for terminal background color: green screen for development, blue for testing, yellow for stage / system test, and red for production. This saved a lot of problems because I knew to be very careful when typing in the red.
Re:How I Fired Myself by hef19898 on Thursday February 28, 2013 @07:09AM (#5298298)
Interessting, I have been the only guy in my team who had the exact opposite colours. Green was production and red was testing (i didn't do any dev work, so). I guess that came from me being from produciton. But I should have payed more attention when working with other people on my machine, in hindsight... Luckily, nothing bad ever happened!
Re:How I Fired Myself by protomyth on Thursday February 28, 2013 @10:44AM (#5299145)
I liked a green screen (too much time spent with old terminals) and blue was ok to type on but not as nice . I went with the yellow (warning) and red (serious warning) because they are not very comfortable to type on and most people get the "alert" status given Star Trek.
Re:How I Fired Myself by rurounijones on Wednesday February 27, 2013 @10:41PM (#5296839)
I have done this on a few servers but found that it always screws up formatting of the lines in bash when they are long and you are hitting up and going back through the history.

Did you change the $PS1 variable? Can you share your config?

Re:How I Fired Myself by mgedmin on Tuesday March 05, 2013 @01:19AM (#5323226)
You need to wrap the escapes in \[ \] to tell bash (actually readline) that these characters do not advance the cursor when printed.
Re:How I Fired Myself by protomyth on Thursday February 28, 2013 @12:02AM (#5297093)
I had it set up on the client side (putty on Windows, terminal on OS X)
Re:How I Fired Myself by Torgo on Wednesday February 27, 2013 @02:37PM (#5294354)
Right on, I started doing this a few years ago. I really like it.
Re:How I Fired Myself by Nick_C on Thursday February 28, 2013 @04:58AM (#5297979)
I also change the prompt colour according to server. I can tell at a glance which machine I'm on (plus the hostname of course).

It means having a slightly difference .bashrc for each machine, but it's trivial.