Fix documentation around optional arguments

This includes:

  - Syncing between the usage string in code and in the manpage
  - Adding optional arguments that were simply not mentioned (e.g.
    shell-command arguments)
  - Adding square brackets around arguments that are actually optional

Co-authored-by: Julian Prein <julian@druck.dev>
This commit is contained in:
Julian Prein
2025-03-20 23:04:28 +01:00
parent 3eb93383a3
commit e776e4f45e
11 changed files with 30 additions and 24 deletions

31
tmux.1
View File

@ -1247,7 +1247,7 @@ Lock all clients attached to
.Op Fl t Ar group-name
.Op Fl x Ar width
.Op Fl y Ar height
.Op Ar shell-command
.Op Ar shell-command Op Ar argument ...
.Xc
.D1 Pq alias: Ic new
Create a new session with name
@ -3088,7 +3088,7 @@ option.
.Op Fl F Ar format
.Op Fl n Ar window-name
.Op Fl t Ar target-window
.Op Ar shell-command
.Op Ar shell-command Op Ar argument ...
.Xc
.D1 Pq alias: Ic neww
Create a new window.
@ -3336,7 +3336,7 @@ to manual in the window options.
.Op Fl c Ar start-directory
.Op Fl e Ar environment
.Op Fl t Ar target-pane
.Op Ar shell-command
.Op Ar shell-command Op Ar argument ...
.Xc
.D1 Pq alias: Ic respawnp
Reactivate a pane in which the command has exited (see the
@ -3362,7 +3362,7 @@ command.
.Op Fl c Ar start-directory
.Op Fl e Ar environment
.Op Fl t Ar target-window
.Op Ar shell-command
.Op Ar shell-command Op Ar argument ...
.Xc
.D1 Pq alias: Ic respawnw
Reactivate a window in which the command has exited (see the
@ -3490,10 +3490,10 @@ the command behaves like
.Op Fl bdfhIvPZ
.Op Fl c Ar start-directory
.Op Fl e Ar environment
.Op Fl F Ar format
.Op Fl l Ar size
.Op Fl t Ar target-pane
.Op Ar shell-command
.Op Fl F Ar format
.Op Ar shell-command Op Ar argument ...
.Xc
.D1 Pq alias: Ic splitw
Create a new pane by splitting
@ -3673,7 +3673,8 @@ Commands related to key bindings are as follows:
.Op Fl nr
.Op Fl N Ar note
.Op Fl T Ar key-table
.Ar key command Op Ar argument ...
.Ar key
.Op Ar command Op Ar argument ...
.Xc
.D1 Pq alias: Ic bind
Bind key
@ -3732,7 +3733,8 @@ command.
.Tg lsk
.It Xo Ic list-keys
.Op Fl 1aN
.Op Fl P Ar prefix-string Fl T Ar key-table
.Op Fl P Ar prefix-string
.Op Fl T Ar key-table
.Op Ar key
.Xc
.D1 Pq alias: Ic lsk
@ -3771,7 +3773,7 @@ lists the command for keys that do not have a note rather than skipping them.
.Op Fl c Ar target-client
.Op Fl N Ar repeat-count
.Op Fl t Ar target-pane
.Ar key ...
.Op Ar key ...
.Xc
.D1 Pq alias: Ic send
Send a key or keys to a window or client.
@ -3924,7 +3926,8 @@ Commands which set options are as follows:
.It Xo Ic set-option
.Op Fl aFgopqsuUw
.Op Fl t Ar target-pane
.Ar option Ar value
.Ar option
.Op Ar value
.Xc
.D1 Pq alias: Ic set
Set a pane option with
@ -5460,7 +5463,7 @@ Hooks are managed with these commands:
.Op Fl agpRuw
.Op Fl t Ar target-pane
.Ar hook-name
.Ar command
.Op Ar command
.Xc
Without
.Fl R ,
@ -5481,6 +5484,7 @@ immediately.
.It Xo Ic show-hooks
.Op Fl gpw
.Op Fl t Ar target-pane
.Op Ar hook
.Xc
Shows hooks.
The flags are the same as for
@ -6652,7 +6656,8 @@ the default is
.Op Fl y Ar position
.Ar name
.Ar key
.Ar command Op Ar argument ...
.Ar command
.Op Ar name key command ...
.Xc
.D1 Pq alias: Ic menu
Display a menu on
@ -6825,7 +6830,7 @@ forwards any input read from stdin to the empty pane given by
.Op Fl w Ar width
.Op Fl x Ar position
.Op Fl y Ar position
.Op Ar shell-command
.Op Ar shell-command Op Ar argument ...
.Xc
.D1 Pq alias: Ic popup
Display a popup running