-
Notifications
You must be signed in to change notification settings - Fork 23
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
Generate help
subcommand
#323
Comments
It should be possible to enumerate available commands with completion mechanism, take a look at I need to think a bit more on making a helper for that, but it should be possible.
They shouldn't be produced. |
Current thoughts. So there's two ways of solving it - adding more functionality to derive macro (in combinatorinc API it's not needed) or stabilizing some bits of the internal API. More stuff in derive macroAdding For derive - I can access command names here
But not here, since
In case where command names are visible I can use some kind of parameter that takes a way to print stuff.... Seems messy. publishing bits of internal APIAlternatively I think second approach is cleaner overall, need to think about this a bit longer. |
@pacak Even the Alternatively, |
Yea, I think publishing them makes sense. It's mostly about going over the available constructors and figuring out how to document them. |
Probably relevant exploration: apple/swift-argument-parser#661 I think many tools use the |
This should be supported as is. Ticket is about ability to write
Yup, makes sense. I'll try to support |
My bad.
You mean |
Just a quality of life thing.
Nearly everyone using our tool tires to run
prog help
andprog help subcommand
.I added a subcommand myself like this:
It works, but I'd expect
prog help doesnotexist
to print an error.I can't enumerate the available subcommands or anything alike so and
--help
permits unknowns #288 :/Btw, are the completion and Stderr variants reachable at all if i pass just a
command --help
in the parser given #288?The text was updated successfully, but these errors were encountered: