mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-03 16:48:45 +00:00
Use vec_append when expanding a command into arguments
This saves some lines and some allocations.
This commit is contained in:
parent
a634e78633
commit
59b63f3aab
1 changed files with 1 additions and 2 deletions
|
@ -893,8 +893,7 @@ end_execution_reason_t parse_execution_context_t::populate_plain_process(
|
||||||
// from expanding the command, followed by the argument nodes themselves. E.g. if the
|
// from expanding the command, followed by the argument nodes themselves. E.g. if the
|
||||||
// command is '$gco foo' and $gco is git checkout.
|
// command is '$gco foo' and $gco is git checkout.
|
||||||
cmd_args.push_back(cmd);
|
cmd_args.push_back(cmd);
|
||||||
cmd_args.insert(cmd_args.end(), args_from_cmd_expansion.begin(),
|
vec_append(cmd_args, std::move(args_from_cmd_expansion));
|
||||||
args_from_cmd_expansion.end());
|
|
||||||
|
|
||||||
ast_args_list_t arg_nodes = get_argument_nodes(statement.args_or_redirs);
|
ast_args_list_t arg_nodes = get_argument_nodes(statement.args_or_redirs);
|
||||||
end_execution_reason_t arg_result =
|
end_execution_reason_t arg_result =
|
||||||
|
|
Loading…
Reference in a new issue