OpenBSD CVS

CVS log for src/usr.bin/tmux/cfg.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.87 / (download) - annotate - [select for diffs], Fri Sep 15 06:31:49 2023 UTC (8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.86: +12 -13 lines
Diff to previous 1.86 (colored)

Add -t to source-file, GitHub issue 3473.

Revision 1.86 / (download) - annotate - [select for diffs], Mon Jun 20 07:59:37 2022 UTC (22 months, 4 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.85: +22 -4 lines
Diff to previous 1.85 (colored)

Do not display configuration file errors in a pane when in control mode,
instead report them with a %config-error notification. GitHub issue 3193.

Revision 1.85 / (download) - annotate - [select for diffs], Mon May 30 13:00:18 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored)

Add a way for lines added to copy mode to be passed through the parser
to handle escape sequences and use it for run-shell, GitHub issue 3156.

Revision 1.84 / (download) - annotate - [select for diffs], Sat Aug 21 17:25:32 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.83: +1 -5 lines
Diff to previous 1.83 (colored)

Stop caring about empty commands, just treat as a null command.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Apr 7 12:50:12 2021 UTC (3 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.82: +19 -3 lines
Diff to previous 1.82 (colored)

Add a current_file format for the config file being parsed. Originally
suggested by kn@, also GitHub issue 2638.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Feb 22 08:18:13 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.81: +12 -20 lines
Diff to previous 1.81 (colored)

Move config file path expansion much earlier, keep the list of paths
around rather than freeing later, and add a config_files format variable
containing it. Suggested by kn@ a while back.

Revision 1.81 / (download) - annotate - [select for diffs], Sat May 16 14:26:33 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.80: +9 -48 lines
Diff to previous 1.80 (colored)

Build list of paths and weed out duplicates before loading configs, and
add TMUX_SOCK like TMUX_PATH for the socket directory.

Revision 1.80 / (download) - annotate - [select for diffs], Mon Apr 13 15:55:51 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored)

When adding a list of commands to the queue, instead of automatically
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).

Revision 1.79 / (download) - annotate - [select for diffs], Fri Apr 10 07:44:26 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

Now that copy mode copies the pane content rather than keeping a
reference to it, it isn't necessary that the pane in copy mode is the
same as the one copying from. Add a -s flag to copy-mode to specify a
different pane for the source content. This means it is possible to view
two places in a pane's history at the same time in different panes, or
copy from a pane's history into an editor or shell in the same pane.

From Anindya Mukherjee.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Dec 19 09:22:33 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.77: +5 -5 lines
Diff to previous 1.77 (colored)

When adding a list with multiple commands to the queue, the next item to
insert after needs to be the last one added, not the first. Reported by
Jason Kim in GitHub issue 2023.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Dec 12 12:49:36 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.76: +47 -1 lines
Diff to previous 1.76 (colored)

Change source-file to use new file code which allows it to read from
stdin.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Dec 10 14:22:15 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.75: +51 -12 lines
Diff to previous 1.75 (colored)

Make TMUX_CONF a list of files and expand leading $FOO or ~.

Revision 1.75 / (download) - annotate - [select for diffs], Thu Jun 20 06:51:36 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.74: +5 -4 lines
Diff to previous 1.74 (colored)

Expand command formats in %if and move the config file loading later (to
when the first client has identified) so all the client formats are
available, fixes problems reported by Thomas Sattler.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Jun 18 11:08:42 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

Add a cmdq_continue function rather than twiddling the flag directly.

Revision 1.73 / (download) - annotate - [select for diffs], Wed Jun 5 20:00:53 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.72: +2 -1 lines
Diff to previous 1.72 (colored)

Add a -v flag to source-file to show the commands and line numbers.

Revision 1.72 / (download) - annotate - [select for diffs], Thu May 23 18:39:00 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.71: +2 -1 lines
Diff to previous 1.71 (colored)

Fix line numbers - commands are added after the line ends so they need to
get line - 1.

Revision 1.71 / (download) - annotate - [select for diffs], Thu May 23 11:13:30 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.70: +33 -205 lines
Diff to previous 1.70 (colored)

Replace the split parser code (cfg.c and cmd-string.c) with a single
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.

Revision 1.70 / (download) - annotate - [select for diffs], Mon May 20 13:23:32 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.69: +15 -12 lines
Diff to previous 1.69 (colored)

Fix ordering of source-file with multiple files and add flags to load_cfg.

Revision 1.69 / (download) - annotate - [select for diffs], Fri May 3 21:21:00 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.68: +4 -3 lines
Diff to previous 1.68 (colored)

Fix order of insertion in load_cfg.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Apr 18 11:07:28 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.67: +22 -10 lines
Diff to previous 1.67 (colored)

Pass target client and session to load_cfg from source-file so formats
work. Reported by Thomas Sattler.

Revision 1.67 / (download) - annotate - [select for diffs], Wed Apr 3 06:43:19 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.66: +3 -2 lines
Diff to previous 1.66 (colored)

Do not load /etc/tmux.conf if given -f.

Revision 1.66 / (download) - annotate - [select for diffs], Tue Mar 12 11:16:49 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.65: +6 -6 lines
Diff to previous 1.65 (colored)

Allow multiple modes to be open in a pane. A stack of open modes is kept
and the previous restored when the top is exited. If a mode that is
already on the stack is entered, the existing instance is moved to the
top as the active mode rather than being opened new.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Mar 8 10:34:20 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.64: +5 -2 lines
Diff to previous 1.64 (colored)

Make the mode used to view command output (a variant of copy mode) use
its own mode definition struct with a different init function rather
than calling special setup functions.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Mar 7 19:34:22 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.63: +1 -2 lines
Diff to previous 1.63 (colored)

Tidy changing the mode into window_copy_init_for_output.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Feb 16 11:42:08 2019 UTC (5 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.62: +3 -2 lines
Diff to previous 1.62 (colored)

Use starting client cwd in config file, GitHub issue 1606.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Jan 15 15:27:03 2018 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.61: +1 -3 lines
Diff to previous 1.61 (colored)

Some unused code, GitHub issue 1219.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Oct 6 18:02:30 2017 UTC (6 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.60: +145 -29 lines
Diff to previous 1.60 (colored)

Support %else in config files to match %if, from Brad Town in GitHub
issue 1071.

Revision 1.60 / (download) - annotate - [select for diffs], Tue May 30 21:44:59 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.59: +2 -3 lines
Diff to previous 1.59 (colored)

Rewrite of choose mode, both to simplify and tidy the code and to add
some modern features.

Now the common code is in mode-tree.c, which provides an API used by the
three modes now separated into window-{buffer,client,tree}.c. Buffer
mode shows buffers, client mode clients and tree mode a tree of
sessions, windows and panes.

Each mode has a common set of key bindings plus a few that are specific
to the mode. Other changes are:

- each mode has a preview pane: for buffers this is the buffer content
  (very useful), for others it is a preview of the pane;

- items may be sorted in different ways ('O' key);

- multiple items may be tagged and an operation applied to all of them
  (for example, to delete multiple buffers at once);

- in tree mode a command may be run on the selected item (session,
  window, pane) or on tagged items (key ':');

- displayed items may be filtered in tree mode by using a format (this
  is used to implement find-window) (key 'f');

- the custom format (-F) for the display is no longer available;

- shortcut keys change from 0-9, a-z, A-Z which was always a bit weird
  with keys used for other uses to 0-9, M-a to M-z.

Now that the code is simpler, other improvements will come later.

Primary key bindings for each mode are documented under the commands in
the man page (choose-buffer, choose-client, choose-tree).

Parts written by Thomas Adam.

Revision 1.59 / (download) - annotate - [select for diffs], Mon May 1 12:20:55 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.58: +3 -2 lines
Diff to previous 1.58 (colored)

In order that people can use formats like #D in #() in the status line
and not have to wait for an update when they change pane, we allow
commands to run more than once a second if the expanded form
changes. Unfortunately this can mean them being run far too often
(pretty much continually) when multiple clients exist, because some
formats (including #D) will always differ between clients.

To avoid this, give each client its own tree of jobs which means that
the same command will be different instances for each client - similar
to how we have the tag to separate commands for different panes.

GitHub issue 889; test case reported by Paul Johnson.

Revision 1.58 / (download) - annotate - [select for diffs], Tue Apr 25 14:46:23 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.57: +32 -8 lines
Diff to previous 1.57 (colored)

Block the initial client if there is one until the configuration file
has finished loading.

Revision 1.57 / (download) - annotate - [select for diffs], Fri Apr 21 14:04:54 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.56: +3 -1 lines
Diff to previous 1.56 (colored)

History needs to be loaded after config parsing is done - now that
commands are queued, that's in cfg_done not after start_cfg finishes.

Revision 1.56 / (download) - annotate - [select for diffs], Fri Apr 21 13:15:43 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.55: +9 -10 lines
Diff to previous 1.55 (colored)

Do not run the config file in the context of the first client, instead
use no client like we did before. This means commands like new-session
won't try to attach if they are in the config file.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Apr 5 10:45:39 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

cfg_file can be static.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Feb 3 11:57:27 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

Add a window or pane id "tag" to each format tree and use it to separate
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.

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

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

Revision 1.52 / (download) - annotate - [select for diffs], Mon Jan 9 21:28:56 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.51: +38 -8 lines
Diff to previous 1.51 (colored)

Add %if/%endif for conditionals when parsing configuration files, the
argument is a format (the new == and != are useful).

Revision 1.51 / (download) - annotate - [select for diffs], Mon Jan 9 19:27:00 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.50: +6 -6 lines
Diff to previous 1.50 (colored)

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

Revision 1.50 / (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.49: +16 -16 lines
Diff to previous 1.49 (colored)

Mass rename struct cmd_q to struct cmdq_item and related.

Revision 1.49 / (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.48: +26 -46 lines
Diff to previous 1.48 (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.48 / (download) - annotate - [select for diffs], Fri Oct 14 18:41:53 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.47: +5 -2 lines
Diff to previous 1.47 (colored)

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.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Oct 11 13:45:47 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.46: +8 -8 lines
Diff to previous 1.46 (colored)

Some other stuff that can be local to one file.

Revision 1.46 / (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.45: +3 -3 lines
Diff to previous 1.45 (colored)

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

Revision 1.45 / (download) - annotate - [select for diffs], Thu May 12 16:05:33 2016 UTC (8 years ago) by tim
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.44: +10 -16 lines
Diff to previous 1.44 (colored)

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

Input and OK nicm@

Revision 1.44 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:12 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.43 / (download) - annotate - [select for diffs], Wed Nov 18 14:27:44 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Use __unused rather than rolling our own.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Sep 9 12:09:21 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

No need to keep global options around for client which doesn't use them.

Revision 1.41 / (download) - annotate - [select for diffs], Tue Sep 1 10:10:59 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.40: +18 -2 lines
Diff to previous 1.40 (colored)

Work out config file when needed not at startup.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Sep 1 10:01:56 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.39: +38 -7 lines
Diff to previous 1.39 (colored)

Move initial conf load into cfg.c.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Jun 5 18:06:30 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Change deref to the more sensible unref, and add a couple I missed before.

Revision 1.38 / (download) - annotate - [select for diffs], Thu May 7 11:42:56 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Style spacing nits.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Apr 27 22:50:35 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.36: +3 -1 lines
Diff to previous 1.36 (colored)

Reset cfg_ncauses to 0 as well or we could allocate the wrong size if
called again.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Apr 25 18:49:01 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.35: +10 -10 lines
Diff to previous 1.35 (colored)

Fix some char* -> char *.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Apr 25 18:47:01 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.34: +19 -16 lines
Diff to previous 1.34 (colored)

Use a char **,u_int pair for cfg_causes.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Apr 19 21:34:21 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

Rewrite of tmux mouse support which was a mess. Instead of having
options for "mouse-this" and "mouse-that", mouse events may be bound as
keys and there is one option "mouse" that turns on mouse support
entirely (set -g mouse on).

See the new MOUSE SUPPORT section of the man page for description of the
key names and new flags (-t= to specify the pane or window under mouse
as a target, and send-keys -M to pass through a mouse event).

The default builtin bindings for the mouse are:

    bind -n   MouseDown1Pane select-pane -t=; send-keys -M
    bind -n MouseDown1Status select-window -t=
    bind -n   MouseDrag1Pane copy-mode -M
    bind -n MouseDrag1Border resize-pane -M

To get the effect of turning mode-mouse off, do:

    unbind -n MouseDrag1Pane
    unbind -temacs-copy MouseDrag1Pane

The old mouse options are now gone, set-option -q may be used to
suppress warnings if mixing configuration files.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Oct 27 22:23:47 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.32: +31 -5 lines
Diff to previous 1.32 (colored)

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

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 25 19:17:27 2014 UTC (9 years, 10 months ago) by tobias
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.31: +18 -48 lines
Diff to previous 1.31 (colored)

Handle escaped back slashes and missing new lines at end of line by using
fparseln instead of reimplementing it on our own.

with input by and ok nicm@

Revision 1.31 / (download) - annotate - [select for diffs], Thu Apr 17 11:38:35 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.30: +1 -2 lines
Diff to previous 1.30 (colored)

Remove some unnecessary includes and fix a typo.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Oct 20 17:28:43 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.29: +16 -1 lines
Diff to previous 1.29 (colored)

Do not run any command line command from the client which starts the
server until after the configuration file completes. This prevents it
racing against run-shell or if-shell in .tmux.conf that run in the
background.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Mar 25 10:06:13 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

Add some additional debug logging.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Mar 24 09:54:10 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.27: +34 -94 lines
Diff to previous 1.27 (colored)

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.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Mar 22 15:54:29 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

Need to set clients in context before changing their reference count.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Mar 22 15:50:13 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.25: +9 -16 lines
Diff to previous 1.25 (colored)

load_cfg can actually use the same context now they are reference counted.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Mar 22 15:49:55 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.24: +20 -17 lines
Diff to previous 1.24 (colored)

Add functions to allocate and free command contexts rather than doing it
all on the stack.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Mar 22 10:41:57 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Don't try to print unterminated strings when loading configuration file.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Mar 22 10:31:22 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.22: +1 -3 lines
Diff to previous 1.22 (colored)

No more lint means no more ARGSUSED.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Mar 21 16:54:37 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.21: +4 -2 lines
Diff to previous 1.21 (colored)

Fix a couple of memory leaks, from Romain Francoise.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Dec 13 15:36:16 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.20: +22 -12 lines
Diff to previous 1.20 (colored)

Change load_cfg to fix a crash reported by jasper.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Dec 6 13:06:05 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.19: +16 -14 lines
Diff to previous 1.19 (colored)

Use strlcat not strncat in load_cfg and some other trivial tidying from
Tiago Cunha.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Nov 27 22:59:34 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

Fix return value of load_cfg, from Thomas Adam.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Nov 27 16:12:29 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.17: +9 -4 lines
Diff to previous 1.17 (colored)

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

Revision 1.17 / (download) - annotate - [select for diffs], Mon Nov 19 10:38:06 2012 UTC (11 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.16: +23 -1 lines
Diff to previous 1.16 (colored)

Use a utility function for common code to show errors in config file,
from Thomas Adam.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jul 11 07:10:15 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.15: +15 -5 lines
Diff to previous 1.15 (colored)

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.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jul 10 11:53:01 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.14: +7 -6 lines
Diff to previous 1.14 (colored)

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

Revision 1.14 / (download) - annotate - [select for diffs], Thu May 17 21:21:31 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.13: +4 -2 lines
Diff to previous 1.13 (colored)

Ignore line continuation when escaped as \\, from Simon Nicolussi.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Aug 24 10:46:01 2011 UTC (12 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.12: +28 -9 lines
Diff to previous 1.12 (colored)

Support \ for line continuation in the configuration file, from Julius
Plenz.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Dec 29 21:28:32 2010 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.11: +6 -6 lines
Diff to previous 1.11 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Tue May 25 19:47:30 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Fix an out-of-date comment.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Feb 6 23:22:27 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.9: +12 -17 lines
Diff to previous 1.9 (colored)

Use the array.h code for the causes list.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Feb 6 17:15:33 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.8: +39 -20 lines
Diff to previous 1.8 (colored)

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.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Nov 26 21:37:13 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 (colored)

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

Revision 1.7 / (download) - annotate - [select for diffs], Mon Oct 26 21:42:04 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

tabs are better; ok nicm

Revision 1.6 / (download) - annotate - [select for diffs], Sun Aug 23 17:29:51 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.5: +11 -6 lines
Diff to previous 1.5 (colored)

When using source-file, run the commands in the context of the source-file
command rather than with no context. This makes things like attach work from a
file.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Aug 23 16:45:00 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.4: +1 -2 lines
Diff to previous 1.4 (colored)

The cursession member in struct cmd_ctx is always either curclient->session or
NULL when curclient is also NULL, so just eliminate it.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Aug 9 08:34:17 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored)

Don't leak in the (rare) case of an invalid command at the end of a file not
terminated by a \n.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jul 30 17:46:12 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.2: +1 -11 lines
Diff to previous 1.2 (colored)

Don't babysit people and let them try to load /dev/zero or (more useful)
/dev/null if they want.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jun 25 06:00:45 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.1: +1 -2 lines
Diff to previous 1.1 (colored)

Unused prototypes. Found by lint, no binary change.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 1 22:58:49 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN

Import tmux, a terminal multiplexor allowing (among other things) a single
terminal to be switched between several different windows and programs
displayed on one terminal be detached from one terminal and moved to another.

ok deraadt pirofti

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.