1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-24 07:46:59 +03:00

add ClearScrollback example that adds CTRL-L after clearing

refs: https://github.com/wez/wezterm/issues/2290
This commit is contained in:
Wez Furlong 2022-07-21 19:35:52 -07:00
parent 67ae0e021f
commit 34f87a9be5

View File

@ -14,6 +14,8 @@ local act = wezterm.action
return {
keys = {
-- Clears only the scrollback and leaves the viewport intact.
-- You won't see a difference in what is on screen, you just won't
-- be able to scroll back until you've output more stuff on screen.
-- This is the default behavior.
{
key = 'K',
@ -26,6 +28,16 @@ return {
mods = 'CTRL|SHIFT',
action = act.ClearScrollback 'ScrollbackAndViewport',
},
-- Clears the scrollback and viewport, and then sends CTRL-L to ask the
-- shell to redraw its prompt
{
key = 'K',
mods = 'CTRL|SHIFT',
action = act.Multiple {
act.ClearScrollback 'ScrollbackAndViewport',
act.SendKey { key = 'L', mods = 'CTRL' },
},
},
},
}
```