4 ms·
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 o
by hollerith 14y ago
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.)
- protomyth 14y agoAt 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.
- Torgo 14y agoRight on, I started doing this a few years ago. I really like it.
- rurounijones 14y agoI 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?
- hef19898 14y agoInteressting, 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!
- protomyth 14y agoI 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.
- Nick_C 14y agoI 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.