mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-26 11:01:16 -03:00
Rework exit command
Prior to this fix, the `exit` command would set a global variable in the reader, which parse_execution would check. However in concurrent mode you may have multiple scripts being sourced at once, and 'exit' should only apply to the current script. Switch to using a variable in the parser's libdata instead.
This commit is contained in:
@@ -490,7 +490,7 @@ int main(int argc, char **argv) {
|
||||
argv + my_optind);
|
||||
}
|
||||
res = run_command_list(parser, &opts.batch_cmds, {});
|
||||
reader_set_end_loop(false);
|
||||
parser.libdata().exit_current_script = false;
|
||||
} else if (my_optind == argc) {
|
||||
// Implicitly interactive mode.
|
||||
res = reader_read(parser, STDIN_FILENO, {});
|
||||
|
||||
Reference in New Issue
Block a user