list key bindings in a Keys section of the -h output

This commit is contained in:
Andrew Hamilton 2026-08-21 19:14:19 +10:00
parent d0851b1ad7
commit 9d3afadcf1
2 changed files with 15 additions and 6 deletions

20
kick.c
View file

@ -7444,11 +7444,9 @@ int main(int argc, char *argv[]) {
"arguments a single\n"
"terminal tab opens ($TERMINAL, default alacritty).\n"
"\n"
"Tabs are managed with Alt chords: hold Alt for the tab "
"list, Alt+Up/Down\n"
"cycle, Alt+Shift+Up/Down reorder, Alt+Delete closes, "
"Alt+Shift+T opens a\n"
"new terminal (--modifier super moves these to Super).\n"
"Tabs are managed with chords on a modifier prefix -- "
"Alt by default;\n"
"--modifier super moves them to Super.\n"
"\n"
"Usage:\n"
" %s [options] [prog...]\n"
@ -7483,7 +7481,17 @@ int main(int argc, char *argv[]) {
" the parent tab, sharing "
"its visibility and\n"
" focus.\n"
" -h, --help Show the full help.\n",
" -h, --help Show the full help.\n"
"\n"
"Keys (hold the modifier):\n"
" Up / Down Cycle tabs; hold to keep "
"cycling.\n"
" Shift+Up / Shift+Down Reorder the active tab.\n"
" Delete Close the active tab.\n"
" Shift+T Open a new terminal tab "
"($TERMINAL).\n"
" Ctrl+Alt+F1..F12 Switch virtual terminals "
"(standalone only).\n",
argv[0], argv[0]);
free(appv);
return 0;

View file

@ -2135,6 +2135,7 @@ def test_dash_h_prints_usage():
assert r.returncode == 0
assert b"Usage:" in r.stdout
assert b"Options:" in r.stdout
assert b"Keys (hold the modifier):" in r.stdout
assert b"--sub-windows tabs|stack" in r.stdout