(which does not have many practical uses) and only support running a
program in the popup. display-popup is now simpler and can accept
multiple arguments to avoid escaping problems (like the other commands).
creating a new state for each group of commands, require the caller to
create one and use it for all the commands in the list. This means the
current target works even with list with multiple groups (which can
happen if they are defined with newlines).
parser using yacc(1). This is a major change but is clearer and simpler
and allows some edge cases to be made more consistent, as well as
tidying up how aliases are handled. It will also allow some further
improvements later.
Entirely the same parser is now used for parsing the configuration file
and for string commands. This means that constructs previously only
available in .tmux.conf, such as %if, can now be used in string commands
(for example, those given to if-shell - not commands invoked from the
shell, they are still parsed by the shell itself).
The only syntax change I am aware of is that #{} outside quotes or a
comment is now considered a format and not a comment, so #{ is now a
syntax error (notably, if it is at the start of a line).
This also adds two new sections to the man page documenting the syntax
and outlining how parsing and command execution works.
Thanks to everyone who sent me test configs (they still all parse
without errors - but this doesn't mean they still work as intended!).
Thanks to Avi Halachmi for testing and man page improvements, also to
jmc@ for reviewing the man page changes.
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.
jobs, this means that if the same job is used for different windows or
panes (for example in pane-border-format), it will be run separately for
each pane.
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.
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.
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.