Created
November 8, 2018 15:45
-
-
Save jalogut/14da745bd01619fb9e3d5b2432b8ac36 to your computer and use it in GitHub Desktop.
Execute bash command in a new window of iterm2
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/bash | |
#set -x | |
COMMAND=$@ | |
osascript -e 'tell application "iTerm2"' \ | |
-e 'create window with default profile command "bash -c \"echo " & "'"${COMMAND}"'" & " && " & "'"${COMMAND}"'" & " && read || read \""' \ | |
-e 'end tell' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment