mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-10 12:51:15 -03:00
Default parser_t::eval()'s block type to top
This is the parameter value at every call site except one. Just make it the default.
This commit is contained in:
@@ -228,7 +228,7 @@ static void source_config_in_directory(const wcstring &dir) {
|
||||
const wcstring cmd = L"builtin source " + escaped_pathname;
|
||||
parser_t &parser = parser_t::principal_parser();
|
||||
set_is_within_fish_initialization(true);
|
||||
parser.eval(cmd, io_chain_t(), block_type_t::top);
|
||||
parser.eval(cmd, io_chain_t());
|
||||
set_is_within_fish_initialization(false);
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ int run_command_list(std::vector<std::string> *cmds, const io_chain_t &io) {
|
||||
|
||||
for (const auto &cmd : *cmds) {
|
||||
const wcstring cmd_wcs = str2wcstring(cmd);
|
||||
eval_result_t eval_res = parser.eval(cmd_wcs, io, block_type_t::top);
|
||||
eval_result_t eval_res = parser.eval(cmd_wcs, io);
|
||||
res = (eval_res == eval_result_t::ok ? 0 : 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user