summaryrefslogtreecommitdiffstats
path: root/vendor/clap_builder/src/builder/command.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /vendor/clap_builder/src/builder/command.rs
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/clap_builder/src/builder/command.rs')
-rw-r--r--vendor/clap_builder/src/builder/command.rs16
1 files changed, 13 insertions, 3 deletions
diff --git a/vendor/clap_builder/src/builder/command.rs b/vendor/clap_builder/src/builder/command.rs
index 2c5eb1989..b2efdbc7e 100644
--- a/vendor/clap_builder/src/builder/command.rs
+++ b/vendor/clap_builder/src/builder/command.rs
@@ -1111,9 +1111,14 @@ impl Command {
///
/// ```no_run
/// # use clap_builder as clap;
- /// # use clap::{Command, ColorChoice, builder::Styles};
+ /// # use clap::{Command, ColorChoice, builder::styling};
+ /// let styles = styling::Styles::styled()
+ /// .header(styling::AnsiColor::Green.on_default() | styling::Effects::BOLD)
+ /// .usage(styling::AnsiColor::Green.on_default() | styling::Effects::BOLD)
+ /// .literal(styling::AnsiColor::Blue.on_default() | styling::Effects::BOLD)
+ /// .placeholder(styling::AnsiColor::Cyan.on_default());
/// Command::new("myprog")
- /// .styles(Styles::styled().usage(Default::default()))
+ /// .styles(styles)
/// .get_matches();
/// ```
#[cfg(feature = "color")]
@@ -1132,6 +1137,9 @@ impl Command {
/// Defaults to current terminal width when `wrap_help` feature flag is enabled. If current
/// width cannot be determined, the default is 100.
///
+ /// **`unstable-v5` feature**: Defaults to unbound, being subject to
+ /// [`Command::max_term_width`].
+ ///
/// **NOTE:** This setting applies globally and *not* on a per-command basis.
///
/// **NOTE:** This requires the `wrap_help` feature
@@ -1158,7 +1166,9 @@ impl Command {
/// This only applies when [`term_width`][Command::term_width] is unset so that the current
/// terminal's width will be used. See [`Command::term_width`] for more details.
///
- /// Using `0` will ignore terminal widths and use source formatting (default).
+ /// Using `0` will ignore this, always respecting [`Command::term_width`] (default).
+ ///
+ /// **`unstable-v5` feature**: Defaults to 100.
///
/// **NOTE:** This setting applies globally and *not* on a per-command basis.
///