October 5th, 2008

Terminal.app in Leopard supports tabs, which is awesome. And, just like Safari, the command to open a new tab is ⌘T.

Call me crazy, but when my brain is in “Terminal mode” things like keyboard shortcuts are just not at the fore (let’s say they’ve been temporarily cached to disk).

What I really wanted was an easy-to-remember command that would open a new tab in Terminal without me having to revert to Mac OS mode. So this is what I added to my .bash_profile:

alias tab="osascript -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down'"

Now I can type tab at any command prompt and instantly get a new tab. One more keystroke, yes, but I preserve my mental context.