Skip to content

Instantly share code, notes, and snippets.

@innocarpe
Created March 6, 2019 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save innocarpe/80888228de49664788c825db5364fcf4 to your computer and use it in GitHub Desktop.
Save innocarpe/80888228de49664788c825db5364fcf4 to your computer and use it in GitHub Desktop.
iTerm workflow applescript for Alfred
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