mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Allow for and other commands missing positionals near keywords (#606)
* Allow for and other commands missing positionals near keywords * A bit more resilience
This commit is contained in:
@ -596,6 +596,17 @@ pub fn parse_internal_call(
|
||||
// spans_idx, end, positional_idx
|
||||
// );
|
||||
|
||||
if spans[..end].is_empty() {
|
||||
error = error.or_else(|| {
|
||||
Some(ParseError::MissingPositional(
|
||||
positional.name.clone(),
|
||||
spans[spans_idx],
|
||||
))
|
||||
});
|
||||
positional_idx += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
let orig_idx = spans_idx;
|
||||
let (arg, err) = parse_multispan_value(
|
||||
working_set,
|
||||
|
Reference in New Issue
Block a user