clap.rs colored help menus for Julia launcher#1236
clap.rs colored help menus for Julia launcher#1236MilesCranmer wants to merge 14 commits intoJuliaLang:mainfrom
Conversation
| julia_cli_impl(true) | ||
| } | ||
|
|
||
| // NOTE: This was last generated against the Julia 1.12.0 help menu |
There was a problem hiding this comment.
What does that mean? Who or what "generated" it? And does this mean the list is specific to 1.12.0? So if 1.13 adds a new option, or removes one, it is not reflected?
There was a problem hiding this comment.
Can we just make it pass-through? Otherwise using --help via +nightly etc will be confusing, and i'm sure we'll forget to update this.
There was a problem hiding this comment.
Yeah I am worried we'd be showing stale --help data.
One way to deal with that would be to add a new hidden argument to Julia, something like --dump-commands which dumps JSON (?) describing all options, and whether they should be shown on --help or --help-hidden, etc. Then we could use that here. (And for the finite number of older versions, either this feature is disabled, or else we just hard code the JSON needed for them in juliaup
|
This looks pretty nice but has merge conflicts by now :-( |
|
On concern with this PR is that it means that |
Currently the Julia help menu within juliaup is missing some of the juliaup-specific stuff, such as the
[+channel]specifier. It also (1) lacks shell completions, (2) lacks colored output (makes it hard to read, especially with how long it has gotten), and (3) it cannot automatically wrap to terminal width.This PR adds a full clap.rs help menu for the julia launcher. This gives us:
--generate-completions <shell>)This also adds three flags:
--help-rawto access the raw Julia help menu (such as for core developers).--help-hidden-rawequivalent but for--help-hidden.--generate-completionsto generate completions for Julia using clap.rs.(This is forked from #1234; that one needs to be merged first in any case).
Here is the current julia launcher help menu on 1.12:
And here is it on a narrow terminal:
With this PR, it looks like this:
and in a narrow terminal: