2020-10-10 18:40:14 +03:00
|
|
|
# CloseCurrentTab
|
|
|
|
|
2020-10-10 19:19:57 +03:00
|
|
|
Closes the current tab, terminating all contained panes. If that was the last
|
|
|
|
tab, closes that window. If that was the last window, wezterm terminates.
|
2020-10-10 18:40:14 +03:00
|
|
|
|
|
|
|
```lua
|
|
|
|
return {
|
|
|
|
keys = {
|
|
|
|
{key="w", mods="CMD", action="CloseCurrentTab"},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2020-11-01 01:51:08 +03:00
|
|
|
*Since: 20201031-154415-9614e117*
|
2020-10-10 19:19:57 +03:00
|
|
|
|
2020-11-01 01:51:08 +03:00
|
|
|
`CloseCurrentTab` was changed so that it requires
|
2020-10-10 19:19:57 +03:00
|
|
|
a boolean `confirm` parameter:
|
|
|
|
|
|
|
|
```lua
|
|
|
|
return {
|
|
|
|
keys = {
|
2022-02-25 09:04:46 +03:00
|
|
|
{key="w", mods="CMD", action=wezterm.action{CloseCurrentTab={confirm=true}}},
|
2020-10-10 19:19:57 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2021-03-22 22:42:46 +03:00
|
|
|
When `confirm` is true, an overlay will render over the tab to ask you to
|
|
|
|
confirm whether you want to close it. See also
|
|
|
|
[skip_close_confirmation_for_processes_named](../config/skip_close_confirmation_for_processes_named.md).
|
|
|
|
|
2020-10-10 19:19:57 +03:00
|
|
|
|
|
|
|
If `confirm` is false then this action will immediately close
|
|
|
|
the tab and terminates its panes without prompting.
|
2020-10-10 18:40:14 +03:00
|
|
|
|