Created
January 31, 2012 14:17
-
-
Save conspirator/1710717 to your computer and use it in GitHub Desktop.
The following AppleScript opens up Terminal, navigates to the path of the active Finder window, opens that directory in Sublime Text 2, and finally kicks off Grunt.js.
This file contains 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
-- ======================================== | |
-- Author: Christopher Webb | |
-- Web: http://conspirator.co | |
-- Twitter: http://twitter.com/conspirator | |
-- ======================================== | |
set finderPath to "" | |
tell application "Finder" | |
try | |
set finderFolder to (folder of the front window as alias) | |
on error | |
set finderFolder to (path to home folder as alias) | |
end try | |
set finderPath to quoted form of POSIX path of finderFolder | |
end tell | |
tell application "Terminal" | |
activate | |
do script "cd " & finderPath & " && subl . && grunt" | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment