mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-13 07:21:13 -03:00
Make block_type_t an enum class
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(), TOP);
|
||||
parser.eval(cmd, io_chain_t(), block_type_t::top);
|
||||
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, TOP);
|
||||
eval_result_t eval_res = parser.eval(cmd_wcs, io, block_type_t::top);
|
||||
res = (eval_res == eval_result_t::ok ? 0 : 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user