Tweaks ArgsNegateSubcommands's doc

This commit is contained in:
liudingming 2021-08-14 02:10:15 +08:00
parent 476dd190b7
commit a8060d305b

View file

@ -407,14 +407,16 @@ pub enum AppSettings {
/// [`ErrorKind::UnknownArgument`]: crate::ErrorKind::UnknownArgument /// [`ErrorKind::UnknownArgument`]: crate::ErrorKind::UnknownArgument
AllowExternalSubcommands, AllowExternalSubcommands,
/// Specifies that use of a valid argument negates [`subcommands`] being used after. By default /// Specifies that use of a valid argument negates [`subcommands`] being
/// `clap` allows arguments between subcommands such as /// used after. By default `clap` allows arguments between subcommands such
/// `<cmd> [cmd_args] <cmd2> [cmd2_args] <cmd3> [cmd3_args]`. This setting disables that /// as `<cmd> [cmd_args] <subcmd> [subcmd_args] <subsubcmd> [subsubcmd_args]`.
/// functionality and says that arguments can only follow the *final* subcommand. For instance
/// using this setting makes only the following invocations possible:
/// ///
/// * `<cmd> <cmd2> <cmd3> [cmd3_args]` /// This setting disables that functionality and says that arguments can
/// * `<cmd> <cmd2> [cmd2_args]` /// only follow the *final* subcommand. For instance using this setting
/// makes only the following invocations possible:
///
/// * `<cmd> <subcmd> <subsubcmd> [subsubcmd_args]`
/// * `<cmd> <subcmd> [subcmd_args]`
/// * `<cmd> [cmd_args]` /// * `<cmd> [cmd_args]`
/// ///
/// # Examples /// # Examples