Created
August 14, 2008 22:46
-
-
Save ymendel/5507 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
CWD=`pwd` | |
case $1 in | |
/*) | |
DIR=$1 | |
;; | |
*) | |
DIR=$CWD/$1 | |
;; | |
esac | |
osascript<<END | |
set thePath to "$DIR" | |
set thePath to (POSIX path of thePath as string) | |
tell application "Terminal" | |
tell application "System Events" to tell process "Terminal" to keystroke "t" using command down | |
do script with command "cd " & quoted form of thePath in front window | |
end tell | |
END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
CWD=`pwd` | |
case $1 in | |
/*) | |
DIR=$1 | |
;; | |
*) | |
DIR=$CWD/$1 | |
;; | |
esac | |
osascript<<END | |
set thePath to "$DIR" | |
set thePath to (POSIX path of thePath as string) | |
tell application "Terminal" | |
do script with command "cd " & quoted form of thePath | |
end tell | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment