Merge pull request #4154 from epage/help

docs: Fix up for changing of help output
This commit is contained in:
Ed Page 2022-08-31 08:48:05 -05:00 committed by GitHub
commit c2f9ecde18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 47 deletions

View file

@ -46,7 +46,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Removed lifetimes from `Command`, `Arg`, `ArgGroup`, and `PossibleValue`
- *(help)* Make `DeriveDisplayOrder` the default and removed the setting. To sort help, set `next_display_order(None)` (#2808)
- *(help)* Subcommand display order respects `Command::next_display_order` instead of `DeriveDisplayOrder` and using its own initial display order value (#2808)
- *(help)* Help headings are now title cased, making any user-provided help headings inconsistent
- *(help)* Help headings are now title cased, making any user-provided help headings inconsistent. To get the old behavior, see `Command::help_template`, `Arg::help_heading`, and `Command::subcommand_help_heading`
- *(env)* Parse `--help` and `--version` like any `ArgAction::SetTrue` flag (#3776)
- *(derive)* Changed the default for arguments from `parse` to `value_parser`., removing `parse` support
- *(derive)* `subcommand_required(true).arg_required_else_help(true)` is set instead of `SubcommandRequiredElseHelp` (#3280)

View file

@ -1072,10 +1072,10 @@ impl Arg {
/// ```text
/// valnames
///
/// USAGE:
/// Usage:
/// valnames [OPTIONS]
///
/// OPTIONS:
/// Options:
/// --config <FILE> Some help text
/// -h, --help Print help information
/// -V, --version Print version information
@ -1129,10 +1129,10 @@ impl Arg {
/// ```text
/// valnames
///
/// USAGE:
/// Usage:
/// valnames [OPTIONS]
///
/// OPTIONS:
/// Options:
/// -h, --help Print help information
/// --io-files <INFILE> <OUTFILE> Some help text
/// -V, --version Print version information
@ -1910,10 +1910,10 @@ impl Arg {
/// ```notrust
/// helptest
///
/// USAGE:
/// Usage:
/// helptest [OPTIONS]
///
/// OPTIONS:
/// Options:
/// --config Some help text describing the --config arg
/// -h, --help Print help information
/// -V, --version Print version information
@ -1964,10 +1964,10 @@ impl Arg {
/// ```text
/// prog
///
/// USAGE:
/// Usage:
/// prog [OPTIONS]
///
/// OPTIONS:
/// Options:
/// --config
/// The config file used by the myprog must be in JSON format
/// with only valid keys and may not contain other nonsense
@ -2030,10 +2030,10 @@ impl Arg {
/// ```text
/// cust-ord
///
/// USAGE:
/// Usage:
/// cust-ord [OPTIONS]
///
/// OPTIONS:
/// Options:
/// -h, --help Print help information
/// -V, --version Print version information
/// -O, --other-option <b> I should be first!
@ -2090,10 +2090,10 @@ impl Arg {
/// ```text
/// nlh
///
/// USAGE:
/// Usage:
/// nlh [OPTIONS]
///
/// OPTIONS:
/// Options:
/// -h, --help Print help information
/// -V, --version Print version information
/// -o, --long-option-flag <value1> <value2>
@ -2136,10 +2136,10 @@ impl Arg {
/// ```text
/// helptest
///
/// USAGE:
/// Usage:
/// helptest [OPTIONS]
///
/// OPTIONS:
/// Options:
/// -h, --help Print help information
/// -V, --version Print version information
/// ```
@ -2310,10 +2310,10 @@ impl Arg {
/// ```text
/// helptest
///
/// USAGE:
/// Usage:
/// helptest [OPTIONS]
///
/// OPTIONS:
/// Options:
/// -h, --help Print help information
/// -V, --version Print version information
/// ```
@ -2337,10 +2337,10 @@ impl Arg {
/// ```text
/// helptest
///
/// USAGE:
/// Usage:
/// helptest [OPTIONS]
///
/// OPTIONS:
/// Options:
/// --config Some help text describing the --config arg
/// -h, --help Print help information
/// -V, --version Print version information
@ -2383,10 +2383,10 @@ impl Arg {
/// ```text
/// helptest
///
/// USAGE:
/// Usage:
/// helptest [OPTIONS]
///
/// OPTIONS:
/// Options:
/// -h, --help Print help information
/// -V, --version Print version information
/// ```
@ -2410,7 +2410,7 @@ impl Arg {
/// ```text
/// helptest
///
/// USAGE:
/// Usage:
/// helptest [OPTIONS]
///
/// OPTIONS:

View file

@ -1660,7 +1660,7 @@ impl Command {
/// Does awesome things\n\
/// (C) me@mail.com\n\n\
///
/// USAGE: myapp <opts> <command>\n\n\
/// Usage: myapp <opts> <command>\n\n\
///
/// Options:\n\
/// -h, --help Display this message\n\
@ -1769,7 +1769,7 @@ impl Command {
///
/// This will be used for any arg that hasn't had [`Arg::help_heading`] called.
///
/// This is useful if the default `OPTIONS` or `ARGS` headings are
/// This is useful if the default `Options` or `Arguments` headings are
/// not specific enough for one's use case.
///
/// For subcommands, see [`Command::subcommand_help_heading`]
@ -2585,16 +2585,16 @@ impl Command {
/// ```text
/// cust-ord
///
/// USAGE:
/// Usage:
/// cust-ord [OPTIONS]
///
/// OPTIONS:
/// -h, --help Print help information
/// -V, --version Print version information
///
/// SUBCOMMANDS:
/// Subcommands:
/// beta I should be first!
/// alpha Some help and text
///
/// Options:
/// -h, --help Print help information
/// -V, --version Print version information
/// ```
#[inline]
#[must_use]
@ -3053,16 +3053,16 @@ impl Command {
/// ```text
/// myprog
///
/// USAGE:
/// Usage:
/// myprog [SUBCOMMAND]
///
/// OPTIONS:
/// -h, --help Print help information
/// -V, --version Print version information
///
/// SUBCOMMANDS:
/// Subcommands:
/// help Print this message or the help of the given subcommand(s)
/// sub1
///
/// Options:
/// -h, --help Print help information
/// -V, --version Print version information
/// ```
///
/// but usage of `subcommand_value_name`
@ -3081,14 +3081,14 @@ impl Command {
/// ```text
/// myprog
///
/// USAGE:
/// Usage:
/// myprog [THING]
///
/// OPTIONS:
/// Options:
/// -h, --help Print help information
/// -V, --version Print version information
///
/// SUBCOMMANDS:
/// Subcommands:
/// help Print this message or the help of the given subcommand(s)
/// sub1
/// ```
@ -3100,7 +3100,7 @@ impl Command {
/// Sets the help heading used for subcommands when printing usage and help.
///
/// By default, this is "SUBCOMMANDS".
/// By default, this is "Subcommands".
///
/// See also [`Command::subcommand_value_name`]
///
@ -3119,14 +3119,14 @@ impl Command {
/// ```text
/// myprog
///
/// USAGE:
/// Usage:
/// myprog [SUBCOMMAND]
///
/// OPTIONS:
/// Options:
/// -h, --help Print help information
/// -V, --version Print version information
///
/// SUBCOMMANDS:
/// Subcommands:
/// help Print this message or the help of the given subcommand(s)
/// sub1
/// ```
@ -3137,7 +3137,7 @@ impl Command {
/// # use clap::{Command, Arg};
/// Command::new("myprog")
/// .subcommand(Command::new("sub1"))
/// .subcommand_help_heading("THINGS")
/// .subcommand_help_heading("Things")
/// .print_help()
/// # ;
/// ```
@ -3147,14 +3147,14 @@ impl Command {
/// ```text
/// myprog
///
/// USAGE:
/// Usage:
/// myprog [SUBCOMMAND]
///
/// OPTIONS:
/// Options:
/// -h, --help Print help information
/// -V, --version Print version information
///
/// THINGS:
/// Things:
/// help Print this message or the help of the given subcommand(s)
/// sub1
/// ```