-
-
Save pwpearson/83a803fe75bbaf472057765b6d324a6a 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 | |
read -r -d '' script <<'EOF' | |
on run argv | |
tell application "iTerm" | |
activate | |
set myterm to (make new terminal) | |
tell myterm | |
launch session "Default" | |
tell the last session | |
repeat with arg in argv | |
say arg | |
write text arg | |
end repeat | |
end tell | |
end tell | |
end tell | |
end run | |
EOF | |
echo "$script" | osascript ``-'' $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment