forked from extern/nushell
Add help flag support to alias (#3595)
This commit is contained in:
parent
d056bf070f
commit
fadcdde7f8
@ -1994,6 +1994,10 @@ fn expand_shorthand_forms(
|
||||
}
|
||||
|
||||
fn parse_alias(call: &LiteCommand, scope: &dyn ParserScope) -> Option<ParseError> {
|
||||
if call.parts.len() == 2 && (call.parts[1].item == "--help" || (call.parts[1].item == "-h")) {
|
||||
return None;
|
||||
}
|
||||
|
||||
if call.parts.len() < 4 {
|
||||
return Some(ParseError::mismatch("alias", call.parts[0].clone()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user