mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-15 09:21:15 -03:00
Set exit status with delete-or-exit
(regression from d415350aaf)
This is important especially in e.g. the new Windows Terminal, because
for some reason that lets the tab stick around if the process exited
with a non-zero status.
Will add tests as soon as I figure out how.
This commit is contained in:
@@ -2993,6 +2993,8 @@ void reader_data_t::handle_readline_command(readline_cmd_t c, readline_loop_stat
|
||||
if (el->position() < el->size()) {
|
||||
delete_char(false /* backward */);
|
||||
} else if (c == rl::delete_or_exit && el->empty()) {
|
||||
// This is by definition a successful exit, override the status
|
||||
parser().set_last_statuses(statuses_t::just(STATUS_CMD_OK));
|
||||
exit_loop_requested = true;
|
||||
check_exit_loop_maybe_warning(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user