File tree Expand file tree Collapse file tree 2 files changed +447
-110
lines changed
Expand file tree Collapse file tree 2 files changed +447
-110
lines changed Original file line number Diff line number Diff line change @@ -132,12 +132,14 @@ impl<'cmd> Parser<'cmd> {
132132 self . cmd[ opt] . is_allow_hyphen_values_set( ) )
133133 {
134134 // ParseResult::MaybeHyphenValue, do nothing
135- } else if self . cmd . get_keymap ( ) . get ( & pos_counter) . is_some_and ( |arg| {
136- self . check_terminator ( arg, arg_os. to_value_os ( ) ) . is_some ( )
137- } ) {
138- // Value terminator for this positional, let positional parsing handle it.
139135 } else {
140136 debug ! ( "Parser::get_matches_with: setting TrailingVals=true" ) ;
137+ if self . cmd . get_keymap ( ) . get ( & pos_counter) . is_some_and ( |arg| {
138+ self . check_terminator ( arg, arg_os. to_value_os ( ) ) . is_some ( )
139+ } ) {
140+ // count as both an escape and terminator
141+ pos_counter += 1 ;
142+ }
141143 trailing_values = true ;
142144 matcher. start_trailing ( ) ;
143145 continue ;
You can’t perform that action at this time.
0 commit comments