Not as fancy as other tips here, but I bet this is really time saving in the long run for most developers.
My core work is alway around ~10 directories, which are mostly code packages. As soon as I start working on a project/team, I create aliases for directories. They take the form:
alias agg="cd /ws/ProjectName/src/PackageName/ &&
echo -n -e '\033]0;PackageName\007' &&
tab-color-devil-blue"
The first part of course navigates to the directory. The second part sets the tabName of my iTerm to the package name. The last part sets the background color of the tab to something unique for the package. This makes it easy to spot the right tab when I have like 10 iTerm tabs open.In case you want to see the definition of the last part:
set_tab_color() {
echo -ne "\033]6;1;bg;red;brightness;$1\a"
echo -ne "\033]6;1;bg;green;brightness;$2\a"
echo -ne "\033]6;1;bg;blue;brightness;$3\a"
}
tab-color-devil-blue() { set_tab_color 34 112 147 }
Tested only in iTerm.