1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 21:32:13 +03:00

docs: Update for confirm parameter when closing panes, tabs

This commit is contained in:
Wez Furlong 2020-10-10 09:19:57 -07:00
parent ba9b98cd28
commit 40d07088d9
3 changed files with 51 additions and 6 deletions

View File

@ -10,6 +10,9 @@ daily) from the master branch. It may not be usable and
the feature set may change. As features stabilize some the feature set may change. As features stabilize some
brief notes about them may accumulate here. brief notes about them may accumulate here.
* New: split/pane support!
See [#157](https://github.com/wez/wezterm/issues/157) for
overall status and additional information.
* The GUI layer now normalizes SHIFT state for keyboard processing. * The GUI layer now normalizes SHIFT state for keyboard processing.
If a keypress is ASCII uppercase and SHIFT is held then the If a keypress is ASCII uppercase and SHIFT is held then the
SHIFT modifier is removed from the set of active modifiers. This SHIFT modifier is removed from the set of active modifiers. This
@ -24,9 +27,6 @@ brief notes about them may accumulate here.
number to be zero based. number to be zero based.
* On Linux and macOS systems, wezterm can now attempt to guess the current * On Linux and macOS systems, wezterm can now attempt to guess the current
working directory that should be set in newly spawned local panes/tabs. working directory that should be set in newly spawned local panes/tabs.
* Experimental support for splits/panes.
See [#157](https://github.com/wez/wezterm/issues/157) for
overall status and additional information.
* We now bundle JetBrains Mono and use it as the default font, * We now bundle JetBrains Mono and use it as the default font,
and add it as a default fallback font. Similarly, we also and add it as a default fallback font. Similarly, we also
bundle Noto Color Emoji as a default fallback for emoji. bundle Noto Color Emoji as a default fallback for emoji.
@ -34,6 +34,8 @@ brief notes about them may accumulate here.
automatic config reloading. When set to false, you will need automatic config reloading. When set to false, you will need
to manually trigger a config reload (default: `SUPER+R` or to manually trigger a config reload (default: `SUPER+R` or
`CTRL+SHIFT+R`) `CTRL+SHIFT+R`)
* [`CloseCurrentTab`](config/lua/keyassignment/CloseCurrentTab.md)
now requires a `confirm` parameter.
### 20200909-002054-4c9af461 ### 20200909-002054-4c9af461

View File

@ -0,0 +1,25 @@
# CloseCurrentPane
Closes the current pane. If that was the last pane in the tab, closes the tab.
If that was the last tab, closes that window. If that was the last window,
wezterm terminates.
The act of closing a pane shuts down the PTY associated with the pane and
then kills the process associated with that pane.
```lua
return {
keys = {
{key="w", mods="CMD",
action=wezterm.action{CloseCurrentPane={confirm=true}}
}
}
```
When `confirm` is true, an overlay will render over the pane to
ask you to confirm whether you want to close it.
If `confirm` is false then this action will immediately close
the pane without prompting.

View File

@ -1,8 +1,7 @@
# CloseCurrentTab # CloseCurrentTab
Equivalent to clicking the `x` on the window title bar to close it: Closes the Closes the current tab, terminating all contained panes. If that was the last
current tab. If that was the last tab, closes that window. If that was the tab, closes that window. If that was the last window, wezterm terminates.
last window, wezterm terminates.
```lua ```lua
return { return {
@ -12,4 +11,23 @@ return {
} }
``` ```
*Since: nightly*
The nightly builds have changed `CloseCurrentTab` so that it requires
a boolean `confirm` parameter:
```lua
return {
keys = {
{key="w", mods="CMD",
action=wezterm.action{CloseCurrentTab={confirm=true}}
}
}
```
When `confirm` is true, an overlay will render over the tab to
ask you to confirm whether you want to close it.
If `confirm` is false then this action will immediately close
the tab and terminates its panes without prompting.