Skip to content

Commit

Permalink
Merge pull request #4043 from epage/action
Browse files Browse the repository at this point in the history
docs(derive): Clarify what defaulted action/value_parser does
  • Loading branch information
epage committed Aug 9, 2022
2 parents f522b2c + c7123b3 commit a61f874
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/_derive/mod.rs
Expand Up @@ -186,11 +186,17 @@
//! - `value_parser [= <expr>]`: [`Arg::value_parser`][crate::Arg::value_parser]
//! - When not present: will auto-select an implementation based on the field type using
//! [`value_parser!][crate::value_parser!]
//! - To register a custom type's [`ValueParser`][crate::builder::ValueParser], implement [`ValueParserFactory`][crate::builder::ValueParserFactory]
//! - When present but defaulted: opt-in to clap v4 semantics
//! - Env parsing is now dependent on inferred parser
//! - `PathBuf` will implicitly skip UTF-8 validation (before it required specifying
//! `try_from_os_str`)
//! - When present, implies `#[clap(action)]`
//! - To register a custom type's [`ValueParser`][crate::builder::ValueParser], implement [`ValueParserFactory`][crate::builder::ValueParserFactory]
//! - `action [= <expr>]`: [`Arg::action`][crate::Arg::action]
//! - When not present: will auto-select an action based on the field type
//! - When present but defaulted: opt-in to clap v4 semantics
//! - When present, implies `#[clap(value_parser)]`
//! - `args_override_self` is forced on for single flags
//! - `help = <expr>`: [`Arg::help`][crate::Arg::help]
//! - When not present: [Doc comment summary](#doc-comments)
//! - `long_help = <expr>`: [`Arg::long_help`][crate::Arg::long_help]
Expand Down

0 comments on commit a61f874

Please sign in to comment.