Created
December 2, 2013 16:22
-
-
Save d0nkeyBOB/7752064 to your computer and use it in GitHub Desktop.
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
on run {input, parameters} | |
cd(input) | |
end run | |
on cd(dir) | |
tell application "iTerm" | |
activate | |
set miniaturized of windows to false | |
try | |
set iterm to the last terminal | |
on error | |
set iterm to (make new terminal) | |
end try | |
tell iterm | |
launch session "Default" | |
tell the last session | |
write text "cd " & (quoted form of POSIX path of (dir as string)) & " && clear && ls -l" | |
end tell | |
end tell | |
end tell | |
end cd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment