From d1b2d29528b7794b41e66fc2136e395a02f8529b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:59:35 +0200 Subject: Merging upstream version 1.73.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/clap_builder/src/builder/command.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'vendor/clap_builder/src/builder/command.rs') 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. /// -- cgit v1.2.3