From 4289a1ebfa7479413ec5ac543b88c4ea039d00a0 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 13 Oct 2016 22:48:51 +0000 Subject: Trying to do hooks generically is way too complicated and unreliable and confusing, particularly trying to automatically figure out what target hooks should be using. So simplify it: - drop before hooks entirely, they don't seem to be very useful; - commands with special requirements now fire their own after hook (for example, if they change session or window, or if they have -t and -s and need to choose which one the hook uses as current target); - commands with no special requirements can have the CMD_AFTERHOOK flag added and they will use the -t state. At the moment new-session, new-window, split-window fire their own hook, and display-message uses the flag. The remaining commands still need to be looked at. --- cmd-source-file.c | 1 - 1 file changed, 1 deletion(-) (limited to 'cmd-source-file.c') diff --git a/cmd-source-file.c b/cmd-source-file.c index ef3ac7ac..0f299ddf 100644 --- a/cmd-source-file.c +++ b/cmd-source-file.c @@ -49,7 +49,6 @@ cmd_source_file_exec(struct cmd *self, struct cmd_q *cmdq) int quiet; cmdq1 = cmdq_new(cmdq->client); - cmdq1->flags |= cmdq->flags & CMD_Q_NOHOOKS; cmdq1->emptyfn = cmd_source_file_done; cmdq1->data = cmdq; -- cgit