Something I have found that helps me when I have multiple tabs open in my terminal is to set the title and badge text; I do this by pressing Cmd + i
and manually setting it.
What I would find even more beneficial is a command line option to set these up.
I have found a function to set the title, but not the badge:
# Set Terminal Tab Title
function title {
echo -ne "\033]0;"$*"\007"
}
Moving one step on from this, I would like to be able to call the function and have it set the title based upon the directory that I am in currently.
So I have two questions:
How can I set the iTerm tab title to the directory that I am in currently?
How can I do the same for the badge?