Skip to content
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

List commands available in a group #4467

Closed
snowleopard opened this issue Apr 8, 2021 · 5 comments
Closed

List commands available in a group #4467

snowleopard opened this issue Apr 8, 2021 · 5 comments
Milestone

Comments

@snowleopard
Copy link
Collaborator

snowleopard commented Apr 8, 2021

Expected Behavior

Run dune ocaml --help (or some other command that's part of a group) and see a list of available subcommands.

Actual Behavior

The current output is not very helpful:

$ dune ocaml --help

DUNE-OCAML(1)                     Dune Manual                    DUNE-OCAML(1)



NAME
       dune-ocaml

SYNOPSIS
       dune ocaml [OPTION]...

OPTIONS
       --help[=FMT] (default=auto)
           Show this help in format FMT. The value FMT must be one of `auto',
           `pager', `groff' or `plain'. With `auto', the format is `pager` or
           `plain' whenever the TERM env var is `dumb' or undefined.

       --version
           Show version information.



Dune n/a                                                         DUNE-OCAML(1)

Reproduction

Run dune ocaml --help.

Specifications

This is on the main branch. We should fix it for Dune 3.

/cc @rgrinberg @jeremiedimino

@snowleopard snowleopard added this to the 3.0 milestone Apr 8, 2021
@rgrinberg rgrinberg self-assigned this Apr 8, 2021
@snowleopard
Copy link
Collaborator Author

@rgrinberg Thanks for self-assigning. I'd like to also discuss one feature.

For the dune cache command, in addition to dune cache trim, I'd like to have dune cache start and dune cache stop that are deprecated. What that means is that I don't want them to show up in the help for dune cache, but if the user calls any of these commands, I want a custom deprecation error message to be printed (instead of a generic "command not found").

Will it be difficult to support this?

@rgrinberg
Copy link
Member

Will it be difficult to support this?

Probably not. However, our changes to cmdliner (The libray we use for the CLI) are supposed to be upstreamed one day. So it would be good to first agree with upstream one such a feature.

@snowleopard
Copy link
Collaborator Author

@rgrinberg Yep, I've just added a comment to the corresponding issue.

@ghost ghost removed this from the 3.0 milestone Oct 20, 2021
@Alizter
Copy link
Collaborator

Alizter commented Dec 1, 2022

@emillon Do we consider this resolved now?

@rgrinberg rgrinberg added this to the 3.5.0 milestone Dec 1, 2022
@rgrinberg rgrinberg removed their assignment Dec 1, 2022
@emillon
Copy link
Collaborator

emillon commented Dec 2, 2022

yes, dune CMD will open a manpage that lists subcommands and their synopsis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants