Created
September 27, 2016 04:31
-
-
Save hex2010/32ac37250865a06bcd7606208260e1b0 to your computer and use it in GitHub Desktop.
Open iTerm2 at folder, Automator service script
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
on run {input, parameters} | |
set my_file to first item of input | |
set dir_path to quoted form of (POSIX path of my_file) | |
tell application "iTerm" | |
set newWindow to (create window with default profile) | |
tell current session of newWindow | |
write text "cd " & dir_path | |
end tell | |
end tell | |
end run | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment