Skip to content

Commit

Permalink
docs: Note user-values subject to value_delimiter
Browse files Browse the repository at this point in the history
Inspired by #4999
  • Loading branch information
epage committed Jul 7, 2023
1 parent 1289534 commit 6541df2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions clap_builder/src/builder/arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,8 @@ impl Arg {
/// at runtime, nor were the conditions met for `Arg::default_value_if`, the `Arg::default_value`
/// will be applied.
///
/// Like with command-line values, this will be split by [`Arg::value_delimiter`].
///
/// # Examples
///
/// First we use the default value without providing any value at runtime.
Expand Down Expand Up @@ -1747,6 +1749,8 @@ impl Arg {
/// [`.require_equals(true)`][Arg::require_equals] configuration option. These are required in
/// order to unambiguously determine what, if any, value was supplied for the argument.
///
/// Like with command-line values, this will be split by [`Arg::value_delimiter`].
///
/// # Examples
///
/// For POSIX style `--color`:
Expand Down Expand Up @@ -1893,6 +1897,8 @@ impl Arg {
/// [`ArgMatches::get_one`][crate::ArgMatches::get_one] will
/// return the default specified.
///
/// Like with command-line values, this will be split by [`Arg::value_delimiter`].
///
/// # Examples
///
/// In this example, we show the variable coming from the environment:
Expand Down Expand Up @@ -2734,6 +2740,8 @@ impl Arg {
/// and `Arg::default_value_if`, and the user **did not** provide this arg at runtime, nor were
/// the conditions met for `Arg::default_value_if`, the `Arg::default_value` will be applied.
///
/// Like with command-line values, this will be split by [`Arg::value_delimiter`].
///
/// # Examples
///
/// First we use the default value only if another arg is present at runtime.
Expand Down Expand Up @@ -2873,6 +2881,8 @@ impl Arg {
/// **NOTE**: The conditions are stored in order and evaluated in the same order. I.e. the first
/// if multiple conditions are true, the first one found will be applied and the ultimate value.
///
/// Like with command-line values, this will be split by [`Arg::value_delimiter`].
///
/// # Examples
///
/// First we use the default value only if another arg is present at runtime.
Expand Down

0 comments on commit 6541df2

Please sign in to comment.