I am looking for a way to automatically open a new window of Terminal.app and run a command in it.
I used to do this with AppleScript, in a way similar to this:
tell application "Terminal"
do script ("some-command")
end tell
The official distribution of Julia opens terminal windows in the same way.
However, if Terminal.app is set up to run a command on startup (which is an often recommended practical way to set a new shell without changing the login shell globally), this method simply fails.
Is there a robust method that works even when an alternative shell is used?