11 ms·
For me, what is more common is the likelihood of doing something in the wrong environment (e.g. lab, dev, stage, prod). To help make things a bit more clear, ou
by jiscariot 2y ago
For me, what is more common is the likelihood of doing something in the wrong environment (e.g. lab, dev, stage, prod). To help make things a bit more clear, our images now override the PS1 with a `(environment)` at the beginning, which is a different color, lab=green, dev=purple, prod=red. If it saves me once, it was worth it.
- oslem 2y agoI’ve tried using iTerm2’s automatic profile switching feature to adjust the theme depending on the connection, but I’ve never been able to get it to work reliably.
- jean_dupont 2y agoI think such a thing can be achieved easily with the starship prompt!
- binwiederhier 2y agoI've used this successfully in the past for Terminator: https://github.com/GratefulTony/TerminatorHostWatch https://github.com/GratefulTony/TerminatorHostWatch
- reddit_clone 2y agoI too use iTerm's profiles to change background colors, fonts etc. to indicate where I am. Reduces number of fat fingering disasters.
- franktankbank 2y agoDouble deep environment protection. True prod servers can't be deployed to except from special terminal which only appears visible to the ProdGlasses(TM). If you are wearing ProdGlass(TM) you receive mild brain wave stimulation which is collected for "product control purposes"(TM) future product development(patent pending).
- drcongo 2y agoI have iTerm set up to change the background colour of a shell based on whether it's local, docker, staging or production, and on top of that prompt colours change depending on how privileged the user is. Without all this, I'm sure I'd be making terrible mistakes on a regular basis.
- jiscariot 2y agoI'm always running in tmux panes so often iterm and those settings seem to conflict. It would be great to go a step further and include a background color change--will have to give it another shot. Thanks for the tip.
- eternityforest 2y agoThat's really cool! I alias cd to always show the first few files in a directory, but a better chance of noticing if I'm in the wrong place, and I always make internal IoT controls show the hostname in the top nav bar. If I have made a mistake once, or imagined a mistake that could be possible, I pretty much always start thinking of technical countermeasures.
- fasten 2y agonice approach. highlighting key info like hostname can definitely help prevent mistakes