In a previous post, I shared a tip on Naming your Terminal tabs in OSX Lion. I’ve been meaning to share some additional shortcuts that I use day-to-day for opening new tabs and renaming them via the command line.
We can rename tabs and windows as before:
Or, leave out the name to base it the current directory:
…and to save typing, these are aliased as ‘tn’ and ‘tw’, so this will do the same:
Now, for opening a new tab we have:
By default this will open a new tab, cd into the same directory as the current tab and name it based on it’s directory. You can optionally include a path:
Of course, there is a lazy version of creating tabs too:
To get this functionality, just drop the following into your
See the Gist here.