OpenBSD CVS

CVS log for src/usr.bin/tmux/Attic/cmd-set-hook.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.13, Fri Apr 26 11:38:51 2019 UTC (5 years ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +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.12 / (download) - annotate - [select for diffs], Wed Jul 4 12:30:52 2018 UTC (5 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.11: +12 -9 lines
Diff to previous 1.11 (colored)

Add set-hook -R to run a hook immediately (useful to set multiple hooks
to the same thing).

Revision 1.11 / (download) - annotate - [select for diffs], Sat Apr 22 10:22:39 2017 UTC (7 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.10: +5 -5 lines
Diff to previous 1.10 (colored)

Get rid of the extra layer of flags and cmd_prepare() and just store the
CMD_FIND_* flags in the cmd_entry and call it for the command. Commands
with special requirements call it themselves and update the target for
hooks to use.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jan 15 22:00:56 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.9: +3 -2 lines
Diff to previous 1.9 (colored)

It is silly for cmd_list_parse to return an integer error when it could
just return NULL.

Revision 1.9 / (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.8: +12 -12 lines
Diff to previous 1.8 (colored)

Mass rename struct cmd_q to struct cmdq_item and related.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Oct 14 22:14:22 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Add CMD_AFTERHOOK flag to the easy commands that don't need any special handling.

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

Add static in cmd-* and fix a few other nits.

Revision 1.6 / (download) - annotate - [select for diffs], Thu May 12 13:21:56 2016 UTC (8 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.5: +13 -4 lines
Diff to previous 1.5 (colored)

set-hook needs CANFAIL like the other set commands.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Dec 14 00:31:54 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.4: +7 -3 lines
Diff to previous 1.4 (colored)

Instead of combined flags for -c, -s, -t, split into different sets
using an enum and simplify the parsing code.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Dec 13 21:53:57 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.3: +17 -11 lines
Diff to previous 1.3 (colored)

Use member names in cmd_entry definitions so I stop getting confused
about the order.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Dec 13 14:32:38 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.2: +5 -10 lines
Diff to previous 1.2 (colored)

Instead of every command resolving the target (-t or -s) itself, prepare
the state (client, session, winlink, pane) for it it before entering the
command. Each command provides some flags that tell the prepare step
what it is expecting.

This is a requirement for having hooks on commands (for example, if you
hook "select-window -t1:2", the hook command should to operate on window
1:2 not whatever it thinks is the current window), and should allow some
other target improvements.

The old cmd_find_* functions remain for the moment but that layer will
be dropped later.

Joint work with Thomas Adam.

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: +2 -3 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.