Skip to content

Instantly share code, notes, and snippets.

@un33k
Forked from epall/nt.sh
Created September 26, 2010 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save un33k/597455 to your computer and use it in GitHub Desktop.
Save un33k/597455 to your computer and use it in GitHub Desktop.
OSX: Start a new terminal with PWD=current directory
#!/usr/bin/env sh
# A simple script to open a new tab in Terminal in the current directory
# Author: Eric Allen
osascript -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' > /dev/null 2>&1
osascript -e "tell application \"Terminal\" to do script \"cd $PWD && clear\" in window 1" > /dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment