Created
March 6, 2019 08:33
-
-
Save innocarpe/80888228de49664788c825db5364fcf4 to your computer and use it in GitHub Desktop.
iTerm workflow applescript for Alfred
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
set shortcut to "{query}" | |
if shortcut is equal to "d" then | |
set _path_ to "~/Desktop" | |
else if shortcut is equal to "gitsh" then | |
set _path_ to "~/.gitsh" | |
else | |
set _path_ to "~" | |
end if | |
tell application "iTerm2" | |
set newWindow to (create window with default profile) | |
tell current session of newWindow | |
set command to "cd " & _path_ & "; clear; pwd;" | |
write text command | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment