37

when you are working with many terminal in different servers, trying to figure out the problem, and after hours, you find out that you are working on the wrong terminal,😵

Comments
  • 6
    Custom prompt!
    And colors, if you can.
    Red for production, green for staging, pink/blue for dev
  • 3
    Two command that will help you, pwd for making sure you're in the right directory and hostname/hostname -i for making sure you're on the right server
  • 3
    I remember the same thing, my friend dropped database table in production, luckily we have nightly backup.

    @Ashkin

    Looks great idea, how to change terminal colors based on sshed machine. Any idea ?
  • 2
    @Gowtham95india
    Terminal profile based on titlebar?
    That should work petty well.
  • 3
    My prompt tells me my username and which machine I'm on, what directory I'm in, what git branch I'm on if applicable (and if there's commits, staged/unstaged changes or not, etc.), and ofc if I'm root or not. Ex:

    Username@machine /current/working/directory (branch*+)
    $ cdls config

    (Plus nice colors.)

    Because of this, I haven't accidentally done anything on the wrong machine or project. Totally recommend!
  • 2
    Try zsh and byobu/tmux 🤘
Add Comment