Created
March 17, 2017 02:43
-
-
Save hcarvalhoalves/aead0009d369d13c634d60fd67f339b9 to your computer and use it in GitHub Desktop.
Shell functions to command iTerm2 via AppleScript
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
#!/bin/env bash | |
function tt() { | |
osascript &>/dev/null <<EOF | |
tell application "iTerm2" | |
tell current window | |
create tab with default profile command "$@" | |
end tell | |
end tell | |
EOF | |
} | |
function th() { | |
osascript &>/dev/null <<EOF | |
tell application "iTerm2" | |
tell current session of current window | |
split horizontally with default profile command "$@" | |
end tell | |
end tell | |
EOF | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment