Add exit bind function

Currently binding `exit` to a key checks too late that it's exitted,
so it leaves the shell hanging around until the user does an execute
or similar.

As I understand it, the `exit` builtin is supposed to only exit the
current "thread" (once that actually becomes a thing), and the
bindings would probably run in a dedicated one, so the simplest
solution here is to just add an `exit` bind function.

Fixes #7604.
This commit is contained in:
Fabian Homborg
2021-01-04 09:45:34 +01:00
parent 4116aaeb5f
commit 6eeb8861e7
4 changed files with 11 additions and 0 deletions

View File

@@ -152,6 +152,7 @@ static const input_function_metadata_t input_function_metadata[] = {
{readline_cmd_t::func_or, L"or"},
{readline_cmd_t::expand_abbr, L"expand-abbr"},
{readline_cmd_t::delete_or_exit, L"delete-or-exit"},
{readline_cmd_t::exit, L"exit"},
{readline_cmd_t::cancel_commandline, L"cancel-commandline"},
{readline_cmd_t::cancel, L"cancel"},
{readline_cmd_t::undo, L"undo"},