mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 10:48:37 +02:00
Remove warnings. Improve unknown flags
This commit is contained in:
@ -40,7 +40,7 @@ pub enum SyntaxShape {
|
||||
/// A math expression which expands shorthand forms on the lefthand side, eg `foo > 1`
|
||||
/// The shorthand allows us to more easily reach columns inside of the row being passed in
|
||||
RowCondition,
|
||||
/// A general math expression, eg the `1 + 2` of `= 1 + 2`
|
||||
/// A general math expression, eg `1 + 2`
|
||||
MathExpression,
|
||||
}
|
||||
|
||||
@ -283,6 +283,10 @@ impl ParserWorkingSet {
|
||||
} else if let Some(first) = unmatched_short_flags.first() {
|
||||
error = error.or(Some(ParseError::UnknownFlag(*first)));
|
||||
}
|
||||
} else if !unmatched_short_flags.is_empty() {
|
||||
if let Some(first) = unmatched_short_flags.first() {
|
||||
error = error.or(Some(ParseError::UnknownFlag(*first)));
|
||||
}
|
||||
}
|
||||
|
||||
for flag in found_short_flags {
|
||||
|
Reference in New Issue
Block a user