-
-
Save vbratkev/82adc12df3c594aa8fcd950dbbc2c86d to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
# Write given argument into current iterm session. (useful if running commands from another application). | |
osascript - "$@" <<EOF | |
on run argv | |
tell application "iTerm2" | |
tell current session of current window | |
repeat with arg in argv | |
write text arg | |
end repeat | |
end tell | |
end tell | |
end run | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment