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

Remove Markdown code from the long CLI help #247

Closed
wants to merge 2 commits into from

Conversation

palant
Copy link
Contributor

@palant palant commented May 24, 2024

As mentioned in #231 (comment), the issue hasn’t been entirely addressed. Clap has a short and a long help variants. While the former has been made proper, the latter still contains doc comments with Markdown code and such.

This change resets the long help, effectively making clap show the short help variant for both -h and --help command line flags. Also fixing the grammar for the --daemon flag description while at it.

$ cargo run --example gateway -- --help
basic 
Command-line options

USAGE:
    gateway [OPTIONS]

OPTIONS:
    -c, --conf <CONF>    The path to the configuration file.
    -d, --daemon         Whether this server should run in the background
    -h, --help           Print help information
    -t, --test           This flag is useful for upgrading service where the user wants to make sure
                         the new service can start before shutting down the old server process.
    -u, --upgrade        This is the base set of command line arguments for a pingora-based service

@palant palant changed the title Cli help cleanup Remove Markdown code from the long CLI help May 24, 2024
@johnhurt johnhurt added the Accepted This change is accepted by us and merged to our internal repo label May 28, 2024
eaufavor pushed a commit that referenced this pull request May 31, 2024
---
While at it, fix grammar in the description of the --daemon flag

Includes-commit: a8dee4e
Includes-commit: f420f36
Replicated-from: #247
eaufavor pushed a commit that referenced this pull request May 31, 2024
---
While at it, fix grammar in the description of the --daemon flag

Includes-commit: a8dee4e
Includes-commit: f420f36
Replicated-from: #247
@drcaramelsyrup
Copy link
Contributor

Merged in b7ac8a5. Thanks for your diligence here!

@palant palant deleted the cli-help-cleanup branch June 8, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted This change is accepted by us and merged to our internal repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants