-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
add short CLI option -P for --project #59867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
" --help-hidden Print uncommon options not shown by `-h`\n\n" | ||
|
||
// startup options | ||
" --project[={<dir>|@temp|@.|@script[<rel>]}] Set <dir> as the active project/environment.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this option is now quite long, I have indented the help text a little:
-P, --project[={<dir>|@temp|@.|@script[<rel>]}] Set <dir> as the active project/environment.
Or, create a temporary environment with `@temp`
The default @. option will search through parent
directories until a Project.toml or JuliaProject.toml
file is found. @script is similar, but searches up
from the programfile or a path relative to
programfile.
-J, --sysimage <file> Start up with the given system image file
-H, --home <dir> Set location of `julia` executable
Is this OK or would you rather realigning like this?
-P, --project[={<dir>|@temp|@.|@script[<rel>]}] Set <dir> as the active project/environment.
Or, create a temporary environment with `@temp`
The default @. option will search through parent
directories until a Project.toml or JuliaProject.toml
file is found. @script is similar, but searches up
from the programfile or a path relative to
programfile.
-J, --sysimage <file> Start up with the given system image file
-H, --home <dir> Set location of `julia` executable
Or putting it all onto the next line like this?
-P, --project[={<dir>|@temp|@.|@script[<rel>]}]
Set <dir> as the active project/environment.
Or, create a temporary environment with `@temp`
The default @. option will search through parent
directories until a Project.toml or JuliaProject.toml
file is found. @script is similar, but searches up
from the programfile or a path relative to
programfile.
-J, --sysimage <file> Start up with the given system image file
-H, --home <dir> Set location of `julia` executable
The test failures look unrelated to this. |
Seems quite reasonable to me. Tagging triage as this expands the public API. |
For me
--project
is by far the most-used CLI option but it doesn't have a short version. This PR adds the alias-P
so now you can dojulia -P @foo
, saving 7 precious keystrokes overjulia --project=@foo
.Note that as a short option, the argument is required, so you cannot do
julia -P
, you must usejulia -P @.
. This is the same limitation as-O
whose argument is optional when used in its long form.This also updates the relevant bits of the
--help
string, docs and man page; and adds some tests by duplicating ones using--project
.