mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00: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:
parent
f9505996e7
commit
1215717d20
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue