=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.1,v retrieving revision 1.639 retrieving revision 1.640 diff -c -r1.639 -r1.640 *** src/usr.bin/tmux/tmux.1 2019/04/25 15:35:07 1.639 --- src/usr.bin/tmux/tmux.1 2019/04/26 11:38:51 1.640 *************** *** 1,4 **** ! .\" $OpenBSD: tmux.1,v 1.639 2019/04/25 15:35:07 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott .\" --- 1,4 ---- ! .\" $OpenBSD: tmux.1,v 1.640 2019/04/26 11:38:51 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott .\" *************** *** 14,20 **** .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" ! .Dd $Mdocdate: April 25 2019 $ .Dt TMUX 1 .Os .Sh NAME --- 14,20 ---- .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" ! .Dd $Mdocdate: April 26 2019 $ .Dt TMUX 1 .Os .Sh NAME *************** *** 3383,3389 **** as Shift, Alt or Ctrl. .El .It Xo Ic show-options ! .Op Fl gqsvw .Op Fl t Ar target-session | Ar target-window .Op Ar option .Xc --- 3383,3389 ---- as Shift, Alt or Ctrl. .El .It Xo Ic show-options ! .Op Fl gHqsvw .Op Fl t Ar target-session | Ar target-window .Op Ar option .Xc *************** *** 3415,3420 **** --- 3415,3422 ---- 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 *************** *** 3439,3444 **** --- 3441,3466 ---- .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. *************** *** 3449,3455 **** layout after every .Ic split-window : .Bd -literal -offset indent ! set-hook after-split-window "selectl even-vertical" .Ed .Pp All the notifications listed in the --- 3471,3477 ---- layout after every .Ic split-window : .Bd -literal -offset indent ! set-hook -g after-split-window "selectl even-vertical" .Ed .Pp All the notifications listed in the *************** *** 3513,3519 **** Hooks are managed with these commands: .Bl -tag -width Ds .It Xo Ic set-hook ! .Op Fl gRu .Op Fl t Ar target-session .Ar hook-name .Ar command --- 3535,3541 ---- Hooks are managed with these commands: .Bl -tag -width Ds .It Xo Ic set-hook ! .Op Fl agRu .Op Fl t Ar target-session .Ar hook-name .Ar command *************** *** 3535,3540 **** --- 3557,3564 ---- .Ar target-session with .Fl t ) . + .Fl a + appends to a hook. Like options, session hooks inherit from the global ones. .Pp With