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:
nicm
2020-04-13 07:25:33 +00:00
parent ad38ef6ff4
commit 9cbe9675ea
5 changed files with 54 additions and 37 deletions

View File

@ -69,10 +69,10 @@ const struct cmd_entry cmd_set_hook_entry = {
.name = "set-hook",
.alias = NULL,
.args = { "agRt:u", 1, 2 },
.usage = "[-agRu] " CMD_TARGET_SESSION_USAGE " hook [command]",
.args = { "agpRt:uw", 1, 2 },
.usage = "[-agpRuw] " CMD_TARGET_PANE_USAGE " hook [command]",
.target = { 't', CMD_FIND_SESSION, CMD_FIND_CANFAIL },
.target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL },
.flags = CMD_AFTERHOOK,
.exec = cmd_set_option_exec