On 5/3/07, Antoine Beyeler abeyeler@dplanet.ch wrote:
What if you want to use iTerm instead? :-)
Here is the one I use:
if [[ -d $TM_SELECTED_FILE ]]; then TM_PATH="$TM_SELECTED_FILE" elif [[ -f $TM_SELECTED_FILE ]]; then TM_PATH="`dirname "$TM_SELECTED_FILE"`" else TM_PATH="`dirname "$TM_FILEPATH"`" fi
osascript <<EOF tell application "iTerm" activate if exists the first terminal then set myterm to the first terminal else set myterm to (make new terminal) end if tell myterm activate current session launch session "Default Session" tell the last session write text "cd '$TM_PATH'; clear; pwd" end tell end tell end tell EOF