Skip to content

Instantly share code, notes, and snippets.

@makevoid
Last active November 21, 2017 10:42
Show Gist options
  • Select an option

  • Save makevoid/a227f4e91c448babfa17a587986a7358 to your computer and use it in GitHub Desktop.

Select an option

Save makevoid/a227f4e91c448babfa17a587986a7358 to your computer and use it in GitHub Desktop.
Run the latest command in terminal via Applescript
# focus terminal
tell application "Terminal"
activate
end tell
# up arrow - enter (run last command)
tell application "System Events"
key code 126
key code 36
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment