Files
LLeMbas-TTY/docs/config/lua/config/exit_behavior.md
T
Wez Furlong db45238769 improve exit_behavior messaging
The status information now explains the exit status and the
exit_behavior, as well as links to the docs on exit_behavior.

refs: https://github.com/wez/wezterm/issues/795
2021-05-15 08:32:29 -07:00

1011 B

exit_behavior = "CloseOnCleanExit"

Since: 20210314-114017-04b7cedd

Controls the behavior when the shell program spawned by the terminal exits. There are three possible values:

  • "Close" - close the corresponding pane as soon as the program exits.
  • "Hold" - keep the pane open after the program exits. The pane must be manually closed via CloseCurrentPane, CloseCurrentTab or closing the window.
  • "CloseOnCleanExit" - if the shell program exited with a successful status, behave like "Close", otherwise, behave like "Hold". This is the default setting.
return {
  exit_behavior = "Hold",
}

Note that most unix shells will exit with the status of the last command that it ran. If you interrupt a command and then use CTRL-D to send EOF to the shell, the shell will return an unsuccessful exit status. With the default exit_behavior="CloseOnCleanExit", that will cause the pane to remain open.