Skip to content

Instantly share code, notes, and snippets.

@nzaillian
Created December 18, 2010 20:27
Show Gist options
  • Save nzaillian/746853 to your computer and use it in GitHub Desktop.
Save nzaillian/746853 to your computer and use it in GitHub Desktop.
open new tab to current working directory in Mac OS X's Terminal.app
#!/bin/bash
#place this somewhere in Bash's $PATH and chmod +x it....
working_dir=$PWD
/usr/bin/osascript<<END
on run
tell application "System Events" to tell process "Terminal" to keystroke "t" using command down
tell application "Terminal" to do script "cd $working_dir" in front window
end run
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment