I\'ve been Googling for a while looking for a simple way to do this, and I can\'t find one.
I have a custom terminal environment set up (zsh) with various aliases and fu
I have a couple of scripts I use:
dup (New window with the working dir):
#!/bin/sh
pwd=`pwd`
osascript -e "tell application \"Terminal\" to do script \"cd $pwd; clear\"" > /dev/null
and tup (New tab with the same working dir):
#!/bin/sh
pwd=`pwd`
osascript -e "tell application \"Terminal\"" \
-e "tell application \"System Events\" to keystroke \"t\" using {command down}" \
-e "do script \"cd $pwd; clear\" in front window" \
-e "end tell"
> /dev/null