mirror of
https://github.com/clap-rs/clap
synced 2024-09-20 14:31:58 +00:00
Merge pull request #4401 from epage/last
fix(complete): Support last(true) with CommandWithArguments
This commit is contained in:
commit
e11afa284b
1 changed files with 2 additions and 2 deletions
|
@ -271,8 +271,8 @@ pub(crate) fn assert_app(cmd: &Command) {
|
|||
);
|
||||
|
||||
assert!(
|
||||
arg.is_trailing_var_arg_set(),
|
||||
"Command {}: Positional argument '{}' has hint CommandWithArguments, so Command must have TrailingVarArg set.",
|
||||
arg.is_trailing_var_arg_set() || arg.is_last_set(),
|
||||
"Command {}: Positional argument '{}' has hint CommandWithArguments, so Command must have `trailing_var_arg(true)` or `last(true)` set.",
|
||||
cmd.get_name(),
|
||||
arg.get_id()
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue