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
As mentioned in https://github.com/cloudflare/pingora/issues/231#issuecomment-2130246506, 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.