forked from extern/nushell
fix argument type (#5695)
* fix argument type * while run external, convert list argument to str * fix argument converting logic * using parse_list_expression instead of parse_full_cell_path * make parsing logic more explicit * revert changes * add tests
This commit is contained in:
@ -294,9 +294,13 @@ pub fn parse_external_call(
|
||||
let (arg, err) = parse_dollar_expr(working_set, *span, expand_aliases_denylist);
|
||||
error = error.or(err);
|
||||
args.push(arg);
|
||||
} else if contents.starts_with(b"(") {
|
||||
let (arg, err) =
|
||||
parse_full_cell_path(working_set, None, *span, expand_aliases_denylist);
|
||||
} else if contents.starts_with(b"[") {
|
||||
let (arg, err) = parse_list_expression(
|
||||
working_set,
|
||||
*span,
|
||||
&SyntaxShape::Any,
|
||||
expand_aliases_denylist,
|
||||
);
|
||||
error = error.or(err);
|
||||
args.push(arg);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user