Add a short builtin help text for each mode accessible with C-h,

based on code from Patrick Motard in GitHub issue 4751.
This commit is contained in:
nicm
2026-03-12 12:40:40 +00:00
parent 19f3fb131b
commit fd62f419ac
9 changed files with 222 additions and 24 deletions

12
tmux.1
View File

@@ -2698,7 +2698,7 @@ zooms the pane.
.Fl y
disables any confirmation prompts.
The following keys may be used in client mode:
.Bl -column "Key" "Function" -offset indent
.Bl -column "KeyXXXXXX" "Function" -offset indent
.It Sy "Key" Ta Sy "Function"
.It Li "Enter" Ta "Choose selected client"
.It Li "Up" Ta "Select previous client"
@@ -2719,6 +2719,7 @@ The following keys may be used in client mode:
.It Li "O" Ta "Change sort order"
.It Li "r" Ta "Reverse sort order"
.It Li "v" Ta "Toggle preview"
.It Li "F1 or C-h" Ta "Display help"
.It Li "q" Ta "Exit mode"
.El
.Pp
@@ -2777,7 +2778,7 @@ zooms the pane.
.Fl y
disables any confirmation prompts.
The following keys may be used in tree mode:
.Bl -column "Key" "Function" -offset indent
.Bl -column "KeyXXXXXX" "Function" -offset indent
.It Sy "Key" Ta Sy "Function"
.It Li "Enter" Ta "Choose selected item"
.It Li "Up" Ta "Select previous item"
@@ -2806,6 +2807,7 @@ The following keys may be used in tree mode:
.It Li "O" Ta "Change sort order"
.It Li "r" Ta "Reverse sort order"
.It Li "v" Ta "Toggle preview"
.It Li "F1 or C-h" Ta "Display help"
.It Li "q" Ta "Exit mode"
.El
.Pp
@@ -2857,7 +2859,7 @@ Option values in the list are shown for the active pane in the current window.
.Fl Z
zooms the pane.
The following keys may be used in customize mode:
.Bl -column "Key" "Function" -offset indent
.Bl -column "KeyXXXXXX" "Function" -offset indent
.It Sy "Key" Ta Sy "Function"
.It Li "Enter" Ta "Set pane, window, session or global option value"
.It Li "Up" Ta "Select previous item"
@@ -2881,6 +2883,7 @@ The following keys may be used in customize mode:
.It Li "C-t" Ta "Tag all items"
.It Li "f" Ta "Enter a format to filter items"
.It Li "v" Ta "Toggle option information"
.It Li "F1 or C-h" Ta "Display help"
.It Li "q" Ta "Exit mode"
.El
.Pp
@@ -7391,7 +7394,7 @@ zooms the pane.
.Fl y
disables any confirmation prompts.
The following keys may be used in buffer mode:
.Bl -column "Key" "Function" -offset indent
.Bl -column "KeyXXXXXX" "Function" -offset indent
.It Sy "Key" Ta Sy "Function"
.It Li "Enter" Ta "Paste selected buffer"
.It Li "Up" Ta "Select previous buffer"
@@ -7411,6 +7414,7 @@ The following keys may be used in buffer mode:
.It Li "O" Ta "Change sort order"
.It Li "r" Ta "Reverse sort order"
.It Li "v" Ta "Toggle preview"
.It Li "F1 or C-h" Ta "Display help"
.It Li "q" Ta "Exit mode"
.El
.Pp