Skip to content

Instantly share code, notes, and snippets.

@DavidBarry
Last active December 14, 2015 11:39
Show Gist options
  • Save DavidBarry/5080817 to your computer and use it in GitHub Desktop.
Save DavidBarry/5080817 to your computer and use it in GitHub Desktop.
A simple ruby script to create a new terminal window in the current directory.
#!/usr/bin/env ruby
exec "osascript -e 'tell application \"terminal\"' -e \"do script \\\"cd #{Dir.pwd}\\\"\" -e 'end tell'"
@DavidBarry
Copy link
Author

For convenience I've aliased this script to neww

Thanks to Luther Blissett for providing the AppleScript in this Stack Overflow answer to make this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment