jmhobbs

Sweet Mac OS X Terminal Function

This is a nifty little trick I swiped from a Stack Overflow question.

Basically it adds a command to run any command in a new tab of the same terminal window you are currently in.

For example, this:

$ tabdo cd /tmp
would launch a new tab, then navigate to /tmp.

To get this trick, just put this in your ~/.bashrc

tabdo () {
/usr/bin/osascript 2>/dev/null <

Here is a demo video, sorry it goes so fast, YouTube sped it up.