I installed Julia on macOS High Sierra (10.13.3) with brew cask install julia, and it opens in Apple Terminal by default.
I am completely new to AppleScript, so I don’t know how to change the default behavior of Julia so that it opens in iTerm2 by default. (App ID - com.googlecode.iterm2).
This is the script for starting Julia:
set RootPath to POSIX path of (path to me)
tell application id "com.apple.terminal"
do script ("exec '" & RootPath & "Contents/Resources/julia/bin/julia'")
activate
end tell
set RootPath to POSIX path of (path to me)
tell application id "com.googlecode.iterm2"
do script ("exec '" & RootPath & "Contents/Resources/julia/bin/julia'")
activate
end tell
Yes, I can open it with Julia within iTerm2, but I prefer opening Julia through Spotlight (i.e. through the executable by searching it, and then running it), but the script that is run by Julia invokes Terminal by default, and not iTerm2 (and I can’t change the script so that it invokes iTerm2, don’t know why. Throws up an error). Just a matter of convenience.
Apologies for resurrecting an old thread but if you open /Applications/Julia-1.0.app/Contents/Resources/Scripts, you can change the file to something similar to:
set RootPath to POSIX path of (path to me)
tell application "iTerm"
tell current window
create tab with default profile command "/Applications/Julia-1.0.app/Contents/Resources/julia/bin/julia"
activate
end tell
end tell