See startup options within Julia

Is there a way to list the command line options (e.g., -p 10, --optimize=1, etc) used to start Julia from within the REPL?

2 Likes

All options are stored in the struct Base.JLOptions().

6 Likes

Thank you!

julia --help

I can’t do that from within the REPL.

Right - but you can do

run(`julia --help`)

Hm - that’s giving me errors:

julia> run(`julia --help`)
ERROR: IOError: could not spawn `julia --help`: no such file or directory (ENOENT)

Strange, it works for me. Is julia in your PATH?

Ah, it might not be. I think that’s by default on MacOS