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.
I’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.
I think such a thing can be achieved easily with the starship prompt!
I've used this successfully in the past for Terminator: https://github.com/GratefulTony/TerminatorHostWatch
I too use iTerm's profiles to change background colors, fonts etc. to indicate where I am.
Reduces number of fat fingering disasters.
Double 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).
I 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.
I'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.