diff options
author | Thomas Adam <thomas@xteddy.org> | 2019-04-27 20:09:07 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2019-04-27 20:09:07 +0100 |
commit | 5489796737108cb9bba01f831421e531a50b946b (patch) | |
tree | 4f3c2727315adabaf5d932a1d81d4fad3e491752 /tmux.1 | |
parent | 85f09f9a4cf52b5af6b84464ea643c7c3686b0ad (diff) | |
parent | dfb7bb683057d08303955c49073f4b475bd0e2d6 (diff) | |
download | rtmux-5489796737108cb9bba01f831421e531a50b946b.tar.gz rtmux-5489796737108cb9bba01f831421e531a50b946b.tar.bz2 rtmux-5489796737108cb9bba01f831421e531a50b946b.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'tmux.1')
-rw-r--r-- | tmux.1 | 30 |
1 files changed, 27 insertions, 3 deletions
@@ -3461,7 +3461,7 @@ function key sequences; these have a number included to indicate modifiers such as Shift, Alt or Ctrl. .El .It Xo Ic show-options -.Op Fl gqsvw +.Op Fl gHqsvw .Op Fl t Ar target-session | Ar target-window .Op Ar option .Xc @@ -3493,6 +3493,8 @@ If is set, no error will be returned if .Ar option is unset. +.Fl H +includes hooks (omitted by default). .It Xo Ic show-window-options .Op Fl gv .Op Fl t Ar target-window @@ -3517,6 +3519,26 @@ commands have an .Em after hook and there are a number of hooks not associated with commands. .Pp +Hooks are stored as array options, members of the array are executed in +order when the hook is triggered. +Hooks may be configured with the +.Ic set-hook +or +.Ic set-option +commands and displayed with +.Ic show-hooks +or +.Ic show-options +.Fl H . +The following two commands are equivalent: +.Bd -literal -offset indent. +set-hook -g pane-mode-changed[42] 'set -g status-left-style bg=red' +set-option -g pane-mode-changed[42] 'set -g status-left-style bg=red' +.Ed +.Pp +Setting a hook without specifying an array index clears the hook and sets the +first member of the array. +.Pp A command's after hook is run after it completes, except when the command is run as part of a hook itself. @@ -3527,7 +3549,7 @@ For example, the following command adds a hook to select the even-vertical layout after every .Ic split-window : .Bd -literal -offset indent -set-hook after-split-window "selectl even-vertical" +set-hook -g after-split-window "selectl even-vertical" .Ed .Pp All the notifications listed in the @@ -3591,7 +3613,7 @@ Run when a window is unlinked from a session. Hooks are managed with these commands: .Bl -tag -width Ds .It Xo Ic set-hook -.Op Fl gRu +.Op Fl agRu .Op Fl t Ar target-session .Ar hook-name .Ar command @@ -3613,6 +3635,8 @@ hooks (for .Ar target-session with .Fl t ) . +.Fl a +appends to a hook. Like options, session hooks inherit from the global ones. .Pp With |