Mac OSX / Terminal Tip : Naming your terminal windows and tabs

Saturday, August 18, 2012 em 01:55
I'm a huge fan for those little tips that can save you some time and frustration.

Recently working with several terminal windows and tabs, I've been finding myself wandering around them to find the right terminal where I wanted to land on. All added up, it was a significant penalty in my "performance" and, even worse, made me mad!

I was already using different color schemes for the different terminal windows, by contexts, so I could quickly identify what was in each terminal once I see it. But since having 6+ terminal windows and colors is not practical, I group some in the same window, again, by context.


I've decided to look for a way to name the terminal window and/or tabs so I can quickly get to the one I needed. It's actually quite simple, just type (in the desired terminal tab):
echo -n -e "\033]0;Your Title Goes Here\007"
et voilà! Precious time saved!

2 comentários

  1. Ben Harold Says:

    Cool tip, but it doesn't work if you're ssh'd into a remote server.

  2. Thanks Ben! You are right, it only works on a local terminal. If you are on a remote server (and also for local ones) you can go the GUI way and hit cmd-i to bring the Inspector window and set it in the Title field.

    Cheers!

Post a Comment