forked from extern/nushell
This reverts commit 0646f1118c
.
This commit is contained in:
@ -30,10 +30,6 @@ impl Command for KnownExternal {
|
||||
true
|
||||
}
|
||||
|
||||
fn is_builtin(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -1079,32 +1079,26 @@ pub fn parse_call(
|
||||
}
|
||||
}
|
||||
|
||||
let decl = working_set.get_decl(decl_id);
|
||||
if decl.is_builtin() {
|
||||
trace!("parsing: internal call");
|
||||
trace!("parsing: internal call");
|
||||
|
||||
// parse internal command
|
||||
let parsed_call = parse_internal_call(
|
||||
working_set,
|
||||
span(&spans[cmd_start..pos]),
|
||||
&spans[pos..],
|
||||
decl_id,
|
||||
expand_aliases_denylist,
|
||||
);
|
||||
// parse internal command
|
||||
let parsed_call = parse_internal_call(
|
||||
working_set,
|
||||
span(&spans[cmd_start..pos]),
|
||||
&spans[pos..],
|
||||
decl_id,
|
||||
expand_aliases_denylist,
|
||||
);
|
||||
|
||||
(
|
||||
Expression {
|
||||
expr: Expr::Call(parsed_call.call),
|
||||
span: span(spans),
|
||||
ty: parsed_call.output,
|
||||
custom_completion: None,
|
||||
},
|
||||
parsed_call.error,
|
||||
)
|
||||
} else {
|
||||
trace!("parsing: `extern` custom command as external call");
|
||||
parse_external_call(working_set, spans, expand_aliases_denylist)
|
||||
}
|
||||
(
|
||||
Expression {
|
||||
expr: Expr::Call(parsed_call.call),
|
||||
span: span(spans),
|
||||
ty: parsed_call.output,
|
||||
custom_completion: None,
|
||||
},
|
||||
parsed_call.error,
|
||||
)
|
||||
} else {
|
||||
// We might be parsing left-unbounded range ("..10")
|
||||
let bytes = working_set.get_span_contents(spans[0]);
|
||||
|
Reference in New Issue
Block a user