Change array item keys to be strings instead of numbers which are

painful to work with.
This commit is contained in:
nicm
2026-07-06 14:29:10 +00:00
parent 79b83600af
commit 1117caaf09
7 changed files with 53 additions and 48 deletions

12
tmux.1
View File

@@ -4574,6 +4574,10 @@ If
.Fl g
is given, the global session or window option is set.
.Pp
Array options may be set by giving a key in square brackets after the option
name, for example
.Ql command-alias[zoom] .
.Pp
.Fl F
expands formats in the option value.
The
@@ -4685,7 +4689,7 @@ it is replaced with
.Ar value .
For example, after:
.Pp
.Dl set \-s command\-alias[100] zoom=\[aq]resize\-pane \-Z\[aq]
.Dl set \-s command\-alias[zoom] zoom=\[aq]resize\-pane \-Z\[aq]
.Pp
Using:
.Pp
@@ -6286,11 +6290,11 @@ or
.Fl H .
The following two commands are equivalent:
.Bd -literal -offset indent.
set\-hook \-g pane\-mode\-changed[42] \[aq]set \-g status\-left\-style bg=red\[aq]
set\-option \-g pane\-mode\-changed[42] \[aq]set \-g status\-left\-style bg=red\[aq]
set\-hook \-g pane\-mode\-changed[style] \[aq]display\-message changed\[aq]
set\-option \-g pane\-mode\-changed[style] \[aq]display\-message changed\[aq]
.Ed
.Pp
Setting a hook without specifying an array index clears the hook and sets the
Setting a hook without specifying an array key clears the hook and sets the
first member of the array.
.Pp
A command's after