OpenBSD CVS

CVS log for src/usr.bin/tmux/Attic/hooks.c


[BACK] Up to [local] / src / usr.bin / tmux

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.11, Fri Apr 26 11:38:51 2019 UTC (5 years ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +1 -1 lines
FILE REMOVED

Merge hooks into options and make each one an array option. This allows
multiple commands to be easily bound to one hook. set-hook and
show-hooks remain but they are now variants of set-option and
show-options. show-options now has a -H flag to show hooks (by default
they are not shown).

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jan 18 07:10:53 2018 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.9: +1 -28 lines
Diff to previous 1.9 (colored)

Remove unused hooks_run function, from Thomas Adam.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Oct 16 19:36:37 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.8: +8 -12 lines
Diff to previous 1.8 (colored)

Provide a way for hooks to tag formats onto the commands they fire so
that the user can get at additional information - now used for the
"hook" format, more to come.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Oct 16 19:04:05 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.7: +21 -21 lines
Diff to previous 1.7 (colored)

Mass rename struct cmd_q to struct cmdq_item and related.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Oct 16 17:55:14 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.6: +21 -45 lines
Diff to previous 1.6 (colored)

Rewrite command queue handling. Each client still has a command queue,
but there is also now a global command queue. Instead of command queues
being dispatched on demand from wherever the command happens to be
added, they are now all dispatched from the top level server
loop. Command queues may now also include callbacks as well as commands,
and items may be inserted after the current command as well as at the end.

This all makes command queues significantly more predictable and easier
to use, and avoids the complex multiple nested command queues used by
source-file, if-shell and friends.

A mass rename of struct cmdq to a better name (cmdq_item probably) is
coming.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Oct 13 22:48:51 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.5: +4 -1 lines
Diff to previous 1.5 (colored)

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.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Oct 10 21:29:23 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.4: +2 -3 lines
Diff to previous 1.4 (colored)

Loads more static, except for cmd-*.c and window-*.c.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Dec 16 21:50:37 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.3: +19 -3 lines
Diff to previous 1.3 (colored)

Add infrastructure to work out the best target given a pane or window
alone and use it to add pane_died and pane_exited hooks.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Dec 15 13:43:07 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.2: +70 -9 lines
Diff to previous 1.2 (colored)

Some hooks API changes to fire a hook while waiting another cmdq and
infrastructure that will be needed soon.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Dec 11 15:46:57 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.1: +20 -10 lines
Diff to previous 1.1 (colored)

We cannot do hooks_find and then hooks_remove because it might have come
from the parent (global) tree, instead make it remove by name like options.

While here, also tidy up a few bits of options and hooks handling (use
RB_FOREACH_SAFE, and a helper function for the free).

Revision 1.1 / (download) - annotate - [select for diffs], Tue Dec 8 01:10:31 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN

Add hooks infrastructure, basic commands (set-hook, show-hooks) and a
couple of not very useful client hooks. This will eventually let
commands be run at various points and on notifications. Joint work with
Thomas Adam.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.