Skip to content

Commit

Permalink
docs(help): Fill in styles docs
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Apr 19, 2023
1 parent 6d5aaae commit 1ca073f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions clap_builder/src/builder/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1081,22 +1081,21 @@ impl Command {
}
}

/// Sets when to color output.
/// Sets the [`Styles`] for terminal output
///
/// **NOTE:** This choice is propagated to all child subcommands.
///
/// **NOTE:** Default behaviour is [`ColorChoice::Auto`].
/// **NOTE:** Default behaviour is [`Styles::default`].
///
/// # Examples
///
/// ```no_run
/// # use clap_builder as clap;
/// # use clap::{Command, ColorChoice};
/// # use clap::{Command, ColorChoice, builder::Styles};
/// Command::new("myprog")
/// .color(ColorChoice::Never)
/// .styles(Styles::styled().usage(Default::default()))
/// .get_matches();
/// ```
/// [`ColorChoice::Auto`]: crate::ColorChoice::Auto
#[cfg(feature = "color")]
#[inline]
#[must_use]
Expand Down

0 comments on commit 1ca073f

Please sign in to comment.