Merge pull request #4267 from jpgrayson/override-usage-help-4

docs: Update multiline usage override rules
This commit is contained in:
Ed Page 2022-09-27 09:05:43 -05:00 committed by GitHub
commit c7dd03e7ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1662,7 +1662,7 @@ impl Command {
/// correctly by the default help formatter:
///
/// - Do not indent the first usage line.
/// - Indent all subsequent usage lines with four spaces.
/// - Indent all subsequent usage lines with seven spaces.
/// - The last line must not end with a newline.
///
/// # Examples
@ -1680,8 +1680,8 @@ impl Command {
/// # use clap::{Command, Arg};
/// Command::new("myprog")
/// .override_usage(
/// "myapp -X [-a] [-b] <file>\n \
/// myapp -Y [-c] <file1> <file2>\n \
/// "myapp -X [-a] [-b] <file>\n \
/// myapp -Y [-c] <file1> <file2>\n \
/// myapp -Z [-d|-e]"
/// )
/// # ;