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

Add doc comments to variants of the arg enum #272

Closed
sorairolake opened this issue Aug 28, 2022 · 2 comments
Closed

Add doc comments to variants of the arg enum #272

sorairolake opened this issue Aug 28, 2022 · 2 comments

Comments

@sorairolake
Copy link
Contributor

sorairolake commented Aug 28, 2022

This will display the value description in some shells (fish/zsh) completions (see PossibleValue::help()).
Also, this will show in long help from clap v4 (see clap-rs/clap#3312).

@ducaale
Copy link
Owner

ducaale commented Aug 29, 2022

I can't think of an arg enum that would benefit from documenting its variants besides --pretty. In #250, I've added the following long-help to the --pretty flag:

--pretty <STYLE>
    Controls output processing. Possible values are:

        all      (default) Enable both coloring and formatting
        colors   Apply syntax highlighting to output
        format   Pretty-print json and sort headers
        none     Disable both coloring and formatting

    Defaults to "format" if the NO_COLOR env is set and to "none" if stdout is not tty.

I can update #250, so possible args for --pretty are documented in shell completions. Do you have any other flags in mind?

Edit: Done in 5b8d663

@sorairolake
Copy link
Contributor Author

sorairolake commented Sep 5, 2022

Other than this, I think either is fine. Because I think the meaning of the value can be understood from the flag name.

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

2 participants