mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Change so that the appropriate hooks for windows and panes belong to
pane/window options rather than all being session options. This is useful for example to create a pane that is automatically closed on some condition. From Anindya Mukherjee.
This commit is contained in:
29
tmux.1
29
tmux.1
@ -3897,6 +3897,7 @@ 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.
|
||||
Like options different hooks may be global or belong to a session, window or pane.
|
||||
Hooks may be configured with the
|
||||
.Ic set-hook
|
||||
or
|
||||
@ -3989,8 +3990,8 @@ 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 agRu
|
||||
.Op Fl t Ar target-session
|
||||
.Op Fl agpRuw
|
||||
.Op Fl t Ar target-pane
|
||||
.Ar hook-name
|
||||
.Ar command
|
||||
.Xc
|
||||
@ -4002,18 +4003,8 @@ unsets) hook
|
||||
.Ar hook-name
|
||||
to
|
||||
.Ar command .
|
||||
If
|
||||
.Fl g
|
||||
is given,
|
||||
.Em hook-name
|
||||
is added to the global list of hooks, otherwise it is added to the session
|
||||
hooks (for
|
||||
.Ar target-session
|
||||
with
|
||||
.Fl t ) .
|
||||
.Fl a
|
||||
appends to a hook.
|
||||
Like options, session hooks inherit from the global ones.
|
||||
The flags are the same as for
|
||||
.Ic set-option .
|
||||
.Pp
|
||||
With
|
||||
.Fl R ,
|
||||
@ -4021,12 +4012,12 @@ run
|
||||
.Ar hook-name
|
||||
immediately.
|
||||
.It Xo Ic show-hooks
|
||||
.Op Fl g
|
||||
.Op Fl t Ar target-session
|
||||
.Op Fl gpw
|
||||
.Op Fl t Ar target-pane
|
||||
.Xc
|
||||
Shows the global list of hooks with
|
||||
.Fl g ,
|
||||
otherwise the session hooks.
|
||||
Shows hooks.
|
||||
The flags are the same as for
|
||||
.Ic show-options .
|
||||
.El
|
||||
.Sh MOUSE SUPPORT
|
||||
If the
|
||||
|
Reference in New Issue
Block a user