History log of /openbsd-src/usr.bin/tmux/cmd-source-file.c (Results 26 – 50 of 56)
Revision Date Author Comments
# 079748ec 09-Jan-2017 nicm <nicm@openbsd.org>

Run the source-file pattern through glob(3).


# 68e0a7f2 16-Oct-2016 nicm <nicm@openbsd.org>

Mass rename struct cmd_q to struct cmdq_item and related.


# 765b9a58 16-Oct-2016 nicm <nicm@openbsd.org>

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 hap

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.

show more ...


# 9a67a5ac 14-Oct-2016 nicm <nicm@openbsd.org>

source-file and some other commands can recurse back into cmdq_continue,
which could potentially free the currently running command, so we need
to take a reference to it in cmdq_continue_one.

Fixes

source-file and some other commands can recurse back into cmdq_continue,
which could potentially free the currently running command, so we need
to take a reference to it in cmdq_continue_one.

Fixes problem reported by Theo Buehler.

show more ...


# 45436ca5 13-Oct-2016 nicm <nicm@openbsd.org>

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 h

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.

show more ...


# dc1f0f5f 10-Oct-2016 nicm <nicm@openbsd.org>

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


# 59c70a5f 12-May-2016 tim <tim@openbsd.org>

- Rework load_cfg() error handling a little.
- Add -q to source-file to suppress errors about nonexistent files.

Input and OK nicm@


# 39ed82a7 29-Apr-2016 nicm <nicm@openbsd.org>

Final parts of command hooks, add before- and after- hooks to each command.


# c057646b 13-Dec-2015 nicm <nicm@openbsd.org>

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


# 3447b427 13-Dec-2015 nicm <nicm@openbsd.org>

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 t

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.

show more ...


# ffa87c31 27-Oct-2014 nicm <nicm@openbsd.org>

Move cfg_causes local into cfg.c and remove struct causelist.


# f0dcb22a 20-Oct-2014 nicm <nicm@openbsd.org>

Instead of setting up the default keys by building the key struct
directly with a helper function in the cmd_entry, include a table of
bind-key commands and pass them through the command parser and a

Instead of setting up the default keys by building the key struct
directly with a helper function in the cmd_entry, include a table of
bind-key commands and pass them through the command parser and a
temporary cmd_q.

As well as being smaller, this will allow default bindings to be command
sequences which will probably be needed soon.

show more ...


# d9ada8a1 10-Oct-2013 nicm <nicm@openbsd.org>

Make cmdq->client_exit a tristate (-1 means "not set") so that if
explicitly set it can be copied from child to parent cmdq by if-shell
and source-file. This fixes using attach or new. From Chris Joh

Make cmdq->client_exit a tristate (-1 means "not set") so that if
explicitly set it can be copied from child to parent cmdq by if-shell
and source-file. This fixes using attach or new. From Chris Johnsen.

show more ...


# 1fe07f53 10-Oct-2013 nicm <nicm@openbsd.org>

Remove the barely-used and unnecessary command check() function.


# 9b8cb735 12-Apr-2013 nicm <nicm@openbsd.org>

Copy the client into the new cmdq in source-file so commands that work
on it (such as new-session) can work. Fixes issue reported by oss-adv at
users dot sf dot net.


# 75da9134 25-Mar-2013 nicm <nicm@openbsd.org>

Continue the parent cmdq after sourcing a file.


# 175d36cc 24-Mar-2013 nicm <nicm@openbsd.org>

Add a command queue to standardize and simplify commands that call other
commands and allow a command to block execution of subsequent
commands. This allows run-shell and if-shell to be synchronous w

Add a command queue to standardize and simplify commands that call other
commands and allow a command to block execution of subsequent
commands. This allows run-shell and if-shell to be synchronous which has
been much requested.

Each client has a default command queue and commands are consumed one at
a time from it. A command may suspend execution from the queue by
returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() -
for example run-shell does this from the callback that is fired after
the job is freed.

When the command queue becomes empty, command clients are automatically
exited (unless attaching). A callback is also fired - this is used for
nested commands in, for example, if-shell which can block execution of
the client's cmdq until a new cmdq becomes empty.

Also merge all the old error/info/print functions together and lose the
old curclient/cmdclient distinction - a cmdq is bound to one client (or
none if in the configuration file), this is a command client if
c->session is NULL otherwise an attached client.

show more ...


# a7971256 27-Nov-2012 nicm <nicm@openbsd.org>

Correctly aggregate together errors from nested config files (with
source-file). Fix by Thomas Adam, reported by Sam Livingstone-Gray


# a224d0d3 11-Jul-2012 nicm <nicm@openbsd.org>

Make command exec functions return an enum rather than -1/0/1 values and
add a new value to mean "leave client running but don't attach" to fix
problems with using some commands in a command sequence

Make command exec functions return an enum rather than -1/0/1 values and
add a new value to mean "leave client running but don't attach" to fix
problems with using some commands in a command sequence. Most of the
work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.

show more ...


# 7d053cf9 10-Jul-2012 nicm <nicm@openbsd.org>

xfree is not particularly helpful, remove it. From Thomas Adam.


# ca7befcc 04-Jan-2011 nicm <nicm@openbsd.org>

Clean up and simplify tmux command argument parsing.

Originally, tmux commands were parsed in the client process into a
struct with the command data which was then serialised and sent to the
server

Clean up and simplify tmux command argument parsing.

Originally, tmux commands were parsed in the client process into a
struct with the command data which was then serialised and sent to the
server to be executed. The parsing was later moved into the server (an
argv was sent from the client), but the parse step and intermediate
struct was kept.

This change removes that struct and the separate parse step. Argument
parsing and printing is now common to all commands (in arguments.c) with
each command left with just an optional check function (to validate the
arguments at parse time), the exec function and a function to set up any
key bindings (renamed from the old init function).

This is overall more simple and consistent.

There should be no changes to any commands behaviour or syntax although
as this touches every command please watch for any unexpected changes.

show more ...


# b719fcb0 29-Dec-2010 nicm <nicm@openbsd.org>

Allow the config file parser and source-file to return "don't exit" to
the client to let attach work from configuration files.


# ed4ccc21 06-Feb-2010 nicm <nicm@openbsd.org>

Use the array.h code for the causes list.


# 9a53e128 06-Feb-2010 nicm <nicm@openbsd.org>

Instead of bailing out on the first configuration file error, carry on,
collecting all the errors, then start with the active window in more mode
displaying them.


# 5c8958bd 26-Nov-2009 nicm <nicm@openbsd.org>

Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.


123