OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.318 / (download) - annotate - [select for diffs], Fri Sep 8 06:52:31 2023 UTC (8 months, 1 week 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.317: +3 -4 lines
Diff to previous 1.317 (colored)

Use DECSLRM and DECFRA only at level 4 rather than checking the terminal
id.

Revision 1.317 / (download) - annotate - [select for diffs], Thu Aug 17 14:10:28 2023 UTC (9 months ago) by nicm
Branch: MAIN
Changes since 1.316: +73 -1 lines
Diff to previous 1.316 (colored)

Add a session, pane and user mouse range types for the status line and
add format variables for mouse_status_line and mouse_status_range so
they can be associated with different commands in the key bindings.
GitHub issue 3652.

Revision 1.316 / (download) - annotate - [select for diffs], Mon Jul 10 09:24:53 2023 UTC (10 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.315: +2 -2 lines
Diff to previous 1.315 (colored)

Use a stack for last panes line windows, from Thomas Bertschinger in
GitHub issue 3588.

Revision 1.315 / (download) - annotate - [select for diffs], Mon Jul 3 10:48:26 2023 UTC (10 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.314: +4 -2 lines
Diff to previous 1.314 (colored)

Do not risk writing over the end of the buffer when it ends in #
(because strchr \0 will be non-NULL), reported by Robert Morris in
GitHub issue 3610.

Revision 1.314 / (download) - annotate - [select for diffs], Fri Jun 30 13:19:32 2023 UTC (10 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.313: +2 -2 lines
Diff to previous 1.313 (colored)

Get rid of some warnings with GCC 10, from Thomas Klausner.

Revision 1.313 / (download) - annotate - [select for diffs], Fri May 19 07:46:34 2023 UTC (12 months ago) by nicm
Branch: MAIN
Changes since 1.312: +16 -1 lines
Diff to previous 1.312 (colored)

Add format for server_sessions, from Magnus Gross.

Revision 1.312 / (download) - annotate - [select for diffs], Mon Mar 27 08:47:57 2023 UTC (13 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.311: +16 -1 lines
Diff to previous 1.311 (colored)

Add a format to show if there are unseen changes while in a mode, from
Dan Aloni in GitHub issue 3498.

Revision 1.311 / (download) - annotate - [select for diffs], Tue Feb 7 10:21:01 2023 UTC (15 months, 1 week ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.310: +44 -2 lines
Diff to previous 1.310 (colored)

Add an L modifier like P, W, S to loop over clients. Also fix some long
lines in tmux(1).

Revision 1.310 / (download) - annotate - [select for diffs], Fri Nov 4 08:03:23 2022 UTC (18 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.309: +29 -3 lines
Diff to previous 1.309 (colored)

Unescape the string for the literal operator (l:) so special characters
work.

Revision 1.309 / (download) - annotate - [select for diffs], Tue Jul 19 06:46:57 2022 UTC (22 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.308: +3 -3 lines
Diff to previous 1.308 (colored)

Fix memory leak, from Gabriel Souza Franco.

Revision 1.308 / (download) - annotate - [select for diffs], Wed Jul 6 07:36:36 2022 UTC (22 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.307: +40 -1 lines
Diff to previous 1.307 (colored)

Support hyperlinks with capture-pane -e and add a mouse_hyperlink
format, GitHub issue 3247 from Jeff Chiang.

Revision 1.307 / (download) - annotate - [select for diffs], Mon Jun 27 09:16:54 2022 UTC (22 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.306: +2 -2 lines
Diff to previous 1.306 (colored)

Tweak previous - find end of style correctly.

Revision 1.306 / (download) - annotate - [select for diffs], Mon Jun 27 09:14:49 2022 UTC (22 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.305: +12 -8 lines
Diff to previous 1.305 (colored)

Do not expand single character format aliases inside #[] since they
interfere with colours. GitHub issue 3239 from Magnus Gross.

Revision 1.305 / (download) - annotate - [select for diffs], Tue Jun 21 09:30:01 2022 UTC (22 months, 4 weeks ago) by nicm
Branch: MAIN
Changes since 1.304: +9 -6 lines
Diff to previous 1.304 (colored)

Store time lines are scrolled into history and display in copy mode.

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

Add pane_start_path to match start_command.

Revision 1.303 / (download) - annotate - [select for diffs], Mon May 30 12:55:25 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.302: +2 -2 lines
Diff to previous 1.302 (colored)

Spacing/style nits.

Revision 1.302 / (download) - annotate - [select for diffs], Tue Mar 8 18:31:46 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.301: +38 -1 lines
Diff to previous 1.301 (colored)

Add remain-on-exit-format to set text shown when pane is dead.

Revision 1.301 / (download) - annotate - [select for diffs], Tue Mar 8 11:28:40 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.300: +61 -1 lines
Diff to previous 1.300 (colored)

Add formats for client and server UID and user (for multiuser setups).

Revision 1.300 / (download) - annotate - [select for diffs], Tue Feb 22 11:10:41 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.299: +11 -1 lines
Diff to previous 1.299 (colored)

Add next_session_id format with the next session ID, GitHub issue 3078.

Revision 1.299 / (download) - annotate - [select for diffs], Mon Oct 25 21:21:16 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.298: +21 -5 lines
Diff to previous 1.298 (colored)

Add a way to force a colour to RGB and a format to display it.

Revision 1.298 / (download) - annotate - [select for diffs], Mon Oct 11 10:55:30 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.297: +2 -2 lines
Diff to previous 1.297 (colored)

Add -e flag to set environment for popup, from Alexis Hildebrandt in
GitHub issue 2924.

Revision 1.297 / (download) - annotate - [select for diffs], Tue Oct 5 20:15:16 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.296: +4 -4 lines
Diff to previous 1.296 (colored)

Fix some warnings.

Revision 1.296 / (download) - annotate - [select for diffs], Tue Oct 5 17:23:13 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.295: +20 -10 lines
Diff to previous 1.295 (colored)

Set mouse_x and mouse_y on the status line, GitHub issue 2913.

Revision 1.295 / (download) - annotate - [select for diffs], Tue Oct 5 12:45:02 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.294: +2 -2 lines
Diff to previous 1.294 (colored)

Do not try to use NULL time values.

Revision 1.294 / (download) - annotate - [select for diffs], Fri Aug 20 20:08:30 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.293: +2 -2 lines
Diff to previous 1.293 (colored)

A couple more spacing fixes.

Revision 1.293 / (download) - annotate - [select for diffs], Fri Aug 20 20:04:22 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.292: +2 -2 lines
Diff to previous 1.292 (colored)

Spacing tweaks.

Revision 1.292 / (download) - annotate - [select for diffs], Fri Aug 20 17:50:42 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.291: +4 -5 lines
Diff to previous 1.291 (colored)

Remove stray spaces after function names.

Revision 1.291 / (download) - annotate - [select for diffs], Thu Aug 12 19:47:05 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.290: +5 -6 lines
Diff to previous 1.290 (colored)

Evaluate styles with the pane variables.

Revision 1.290 / (download) - annotate - [select for diffs], Thu Aug 12 08:10:20 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.289: +2 -2 lines
Diff to previous 1.289 (colored)

Do not dereference pane when it is NULL, fixes a crash when creating a
hook from the config, GitHub issue 2820.

Revision 1.289 / (download) - annotate - [select for diffs], Thu Aug 12 08:05:11 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.288: +23 -1 lines
Diff to previous 1.288 (colored)

Move hook format setup earlier and add a hook_client, GitHub issue 2809.

Revision 1.288 / (download) - annotate - [select for diffs], Tue Jul 13 22:09:29 2021 UTC (2 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.287: +5 -5 lines
Diff to previous 1.287 (colored)

Give #() commands a one second grace period where the output is empty
before telling the user they aren't doing anything. GitHub issue 2774.

Revision 1.287 / (download) - annotate - [select for diffs], Thu Jul 8 11:14:53 2021 UTC (2 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.286: +5 -3 lines
Diff to previous 1.286 (colored)

Fix mouse_word format now word-separators has no space and position of
menu if too close to the bottom.

Revision 1.286 / (download) - annotate - [select for diffs], Thu Jun 10 07:58:08 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.285: +6 -4 lines
Diff to previous 1.285 (colored)

Bump FORMAT_LOOOP_LIMIT and add a log message when hit, GitHub issue 2715.

Revision 1.285 / (download) - annotate - [select for diffs], Thu Jun 10 07:57:06 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.284: +2 -2 lines
Diff to previous 1.284 (colored)

Fix <= operator.

Revision 1.284 / (download) - annotate - [select for diffs], Thu Jun 10 07:45:43 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.283: +2 -2 lines
Diff to previous 1.283 (colored)

Fix warnings, from Jan Tache in GitHub issue 2692.

Revision 1.283 / (download) - annotate - [select for diffs], Mon Apr 12 06:50:25 2021 UTC (3 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.282: +26 -10 lines
Diff to previous 1.282 (colored)

Permit shortcut keys in buffer, client, tree modes to be configured with
a format; the default remains the line number. GitHub issue 2636.

Revision 1.282 / (download) - annotate - [select for diffs], Thu Mar 11 07:08:18 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.281: +11 -22 lines
Diff to previous 1.281 (colored)

Tidy old jobs every hour instead of every 30 seconds.

Revision 1.281 / (download) - annotate - [select for diffs], Tue Mar 2 10:56:45 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.280: +2 -2 lines
Diff to previous 1.280 (colored)

Drop support for popups where the content is provided directly to tmux
(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).

Revision 1.280 / (download) - annotate - [select for diffs], Sat Feb 27 06:28:16 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.279: +5 -2 lines
Diff to previous 1.279 (colored)

Handle NULL term_type.

Revision 1.279 / (download) - annotate - [select for diffs], Fri Feb 26 21:53:41 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.278: +5 -5 lines
Diff to previous 1.278 (colored)

Check session, window, pane in the right order when working out format type.

Revision 1.278 / (download) - annotate - [select for diffs], Fri Feb 26 07:53:26 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.277: +29 -1 lines
Diff to previous 1.277 (colored)

Add a couple of format variables for active and last window index.

Revision 1.277 / (download) - annotate - [select for diffs], Wed Feb 24 09:22:15 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.276: +3 -3 lines
Diff to previous 1.276 (colored)

Correct client_prefix so it returns 1 if in prefix, not 0.

Revision 1.276 / (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.275: +24 -1 lines
Diff to previous 1.275 (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.275 / (download) - annotate - [select for diffs], Mon Feb 22 07:09:06 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.274: +2073 -490 lines
Diff to previous 1.274 (colored)

There are many format variables now so allocating all the default ones
each time a tree is created is too expensive. Instead, convert them all
into callbacks and put them in a static table so they only allocate on
demand. The tree remains for the moment for extra (non-default)
variables added by for example copy mode or popups. Also reduce
expensive calls to localtime_r/strftime. GitHub issue 2253.

Revision 1.274 / (download) - annotate - [select for diffs], Mon Feb 15 09:39:37 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.273: +25 -1 lines
Diff to previous 1.273 (colored)

Support X11 colour names and some other variations for OSC 10/11, also
add OSC 110 and 111. GitHub issue 2567.

Revision 1.273 / (download) - annotate - [select for diffs], Tue Feb 9 14:25:40 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.272: +5 -3 lines
Diff to previous 1.272 (colored)

Do not expand times and #() inside #().

Revision 1.272 / (download) - annotate - [select for diffs], Fri Feb 5 12:23:49 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.271: +61 -2 lines
Diff to previous 1.271 (colored)

Add a -S flag to new-window to make it select the existing window if one
with the given name already exists rather than failing with an error.
Also add a format to check if a window or session name exists which
allows the same with other commands. Requested by and discussed with
kn@.

Revision 1.271 / (download) - annotate - [select for diffs], Fri Jan 29 09:48:43 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.270: +1 -4 lines
Diff to previous 1.270 (colored)

Trim output overwritten by later text or clears completely rather than
only in a few cases. This means we can better track when a line should
wrap. GitHub issue 2537.

Revision 1.270 / (download) - annotate - [select for diffs], Wed Jan 20 07:16:54 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.269: +17 -15 lines
Diff to previous 1.269 (colored)

Change so that window_flags escapes # automatically which means configs
will not have to change. A new format window_raw_flags contains the old
unescaped version.

Revision 1.269 / (download) - annotate - [select for diffs], Wed Dec 30 18:29:40 2020 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.268: +2 -2 lines
Diff to previous 1.268 (colored)

Use right format for session loop, GitHub issue 2519.

Revision 1.268 / (download) - annotate - [select for diffs], Tue Dec 15 08:31:50 2020 UTC (3 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.267: +2 -2 lines
Diff to previous 1.267 (colored)

Make synchronize-panes a pane option and add -U flag to set-option to
unset an option on all panes. GitHub issue 2491 from Rostislav Nesin.

Revision 1.267 / (download) - annotate - [select for diffs], Tue Dec 1 08:12:58 2020 UTC (3 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.266: +30 -4 lines
Diff to previous 1.266 (colored)

Make replacement of ##s consistent when drawing formats, whether
followed by [ or not. Add a flag (e) to the q: format modifier to double
up #s and use it for the window_flags format variable so it doesn't end
up escaping any following text. GitHub issue 2485.

Revision 1.266 / (download) - annotate - [select for diffs], Mon Nov 9 09:10:10 2020 UTC (3 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.265: +37 -5 lines
Diff to previous 1.265 (colored)

Change how escaping is processed for formats so that ## and # can be
used in styles. Also add a 'w' format modifier for the width. From Chas
J Owens IV in GitHub issue 2389.

Revision 1.265 / (download) - annotate - [select for diffs], Mon Nov 2 08:21:30 2020 UTC (3 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.264: +42 -2 lines
Diff to previous 1.264 (colored)

Add numeric comparisons for formats, from teo_paul1 at yahoo dot com in
GitHub issue 2442.

Revision 1.264 / (download) - annotate - [select for diffs], Tue Oct 6 07:36:42 2020 UTC (3 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.263: +2 -2 lines
Diff to previous 1.263 (colored)

Fix a last minute change in previous.

Revision 1.263 / (download) - annotate - [select for diffs], Tue Oct 6 07:36:05 2020 UTC (3 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.262: +230 -173 lines
Diff to previous 1.262 (colored)

Add a state struct to store working state during format expansion
instead of modiyfing the format tree.

Use this to disable nested job expansion so that the result of #() is
not expanded again. Reported by Chas J Owens IV, GitHub issue 2390.

Revision 1.262 / (download) - annotate - [select for diffs], Wed Sep 16 18:37:55 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.261: +1 -6 lines
Diff to previous 1.261 (colored)

Fix some warnings, GitHub issue 2382.

Revision 1.261 / (download) - annotate - [select for diffs], Thu Aug 27 06:55:54 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.260: +2 -1 lines
Diff to previous 1.260 (colored)

Add pane_last format, GitHub issue 2353.

Revision 1.260 / (download) - annotate - [select for diffs], Thu Aug 20 16:57:40 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.259: +27 -12 lines
Diff to previous 1.259 (colored)

Add n: modifier to get length of a format, also automatically expand
variable name arguments again if they contain a #{.

Revision 1.259 / (download) - annotate - [select for diffs], Tue Jun 23 05:23:26 2020 UTC (3 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.258: +2 -2 lines
Diff to previous 1.258 (colored)

Use xvasprintf not vasprintf.

Revision 1.258 / (download) - annotate - [select for diffs], Thu Jun 11 19:43:34 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.257: +8 -1 lines
Diff to previous 1.257 (colored)

Add some formats for search in copy mode (search_present, search_match).
GitHub issue 2268.

Revision 1.257 / (download) - annotate - [select for diffs], Mon Jun 1 19:39:25 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.256: +169 -154 lines
Diff to previous 1.256 (colored)

Change format callback to return value rather than storing it in the entry.

Revision 1.256 / (download) - annotate - [select for diffs], Mon May 25 15:02:25 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.255: +31 -6 lines
Diff to previous 1.255 (colored)

Make some data types consistent.

Revision 1.255 / (download) - annotate - [select for diffs], Sat May 16 16:02:24 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.254: +2 -2 lines
Diff to previous 1.254 (colored)

Add a customize mode where keys and options may be browsed and changed,
includes adding a brief description of each option. Bound to "C" by
default.

Revision 1.254 / (download) - annotate - [select for diffs], Sat May 16 15:48:35 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.253: +45 -12 lines
Diff to previous 1.253 (colored)

Allow a custom time format to be given to the t format modifier.

Revision 1.253 / (download) - annotate - [select for diffs], Sat May 16 15:47:22 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.252: +2 -4 lines
Diff to previous 1.252 (colored)

Change message log to be per server rather than per client and include
every command that is run.

Revision 1.252 / (download) - annotate - [select for diffs], Sat May 16 15:45:29 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.251: +2 -2 lines
Diff to previous 1.251 (colored)

Change the existing client flags for control mode to apply for any
client, use the same mechanism for the read-only flag and add an
ignore-size flag.

refresh-client -F has become -f (-F stays for backwards compatibility)
and attach-session and switch-client now have -f flags also. A new
format "client_flags" lists the flags and is shown by list-clients by
default.

This separates the read-only flag from "ignore size" behaviour (new
ignore-size) flag - both behaviours are useful in different
circumstances.

attach -r and switchc -r remain and set or toggle both flags together.

Revision 1.251 / (download) - annotate - [select for diffs], Sat May 16 14:55:38 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.250: +4 -6 lines
Diff to previous 1.250 (colored)

Call format_defaults_window for panes as well.

Revision 1.250 / (download) - annotate - [select for diffs], Sat May 16 14:53:23 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.249: +44 -10 lines
Diff to previous 1.249 (colored)

Use a grid cell not a style for the pane style.

Revision 1.249 / (download) - annotate - [select for diffs], Sat May 16 14:30:17 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.248: +3 -1 lines
Diff to previous 1.248 (colored)

Move terminal features into a single file.

Revision 1.248 / (download) - annotate - [select for diffs], Sat May 16 14:10:29 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.247: +97 -34 lines
Diff to previous 1.247 (colored)

Tweak the default choose modes formats:

- Only show pane title if it is not default and not empty.
- Add a prettier time format and use that instead of long ctime().
- Remove clutter and change the order.

Revision 1.247 / (download) - annotate - [select for diffs], Wed Apr 22 20:47:00 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.246: +6 -1 lines
Diff to previous 1.246 (colored)

Add a session_marked format like window_marked.

Revision 1.246 / (download) - annotate - [select for diffs], Mon Apr 20 13:25:36 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.245: +5 -4 lines
Diff to previous 1.245 (colored)

Tidy up the terminal detection and feature code and add named sets of
terminal features, each of which are defined in one place and map to a
builtin set of terminfo(5) capabilities. Features can be specified based
on TERM with a new terminal-features option or with the -T flag when
running tmux. tmux will also detect a few common terminals from the DA
and DSR responses.

This is intended to make it easier to configure tmux's use of
terminfo(5) even in the presence of outdated ncurses(3) or terminfo(5)
databases or for features which do not yet have a terminfo(5) entry.
Instead of having to grok terminfo(5) capability names and what they
should be set to in the terminal-overrides option, the user can
hopefully just give tmux a feature name and let it do the right thing.

The terminal-overrides option remains both for backwards compatibility
and to allow tweaks of individual capabilities.

tmux already did much of this already, this makes it tidier and simpler
to configure.

Revision 1.245 / (download) - annotate - [select for diffs], Sat Apr 18 14:21:39 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.244: +2 -2 lines
Diff to previous 1.244 (colored)

Use size_t not u_int for the bytes counters and fix a const missing.

Revision 1.244 / (download) - annotate - [select for diffs], Sat Apr 18 09:00:31 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.243: +3 -3 lines
Diff to previous 1.243 (colored)

Use peek line function instead of hoking in the array directly.

Revision 1.243 / (download) - annotate - [select for diffs], Sat Apr 18 07:19:28 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.242: +4 -1 lines
Diff to previous 1.242 (colored)

Add formats for pane written/skipped bytes for debugging.

Revision 1.242 / (download) - annotate - [select for diffs], Thu Apr 16 14:25:35 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.241: +2 -2 lines
Diff to previous 1.241 (colored)

Move the UTF-8 flag to terminal flags.

Revision 1.241 / (download) - annotate - [select for diffs], Mon Apr 13 20:51:57 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.240: +4 -4 lines
Diff to previous 1.240 (colored)

Make client -c and -t handling common in cmd-queue.c and try to be
clearer about whether the client is the target client (must have a
session) or not.

Revision 1.240 / (download) - annotate - [select for diffs], Mon Apr 13 14:46:04 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.239: +3 -6 lines
Diff to previous 1.239 (colored)

Move cmdq_state into cmd-queue.c.

Revision 1.239 / (download) - annotate - [select for diffs], Mon Apr 13 14:04:25 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.238: +4 -4 lines
Diff to previous 1.238 (colored)

Rename cmdq_shared to cmdq_state which will better reflect what it is
(going to be) used for.

Revision 1.238 / (download) - annotate - [select for diffs], Mon Apr 13 13:42:35 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.237: +2 -2 lines
Diff to previous 1.237 (colored)

Store a key event not a mouse event in the shared data.

Revision 1.237 / (download) - annotate - [select for diffs], Mon Apr 13 10:59:58 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.236: +18 -13 lines
Diff to previous 1.236 (colored)

Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make its
use more clearly defined and preparation for some future work).

Revision 1.236 / (download) - annotate - [select for diffs], Mon Apr 13 08:26:27 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.235: +5 -3 lines
Diff to previous 1.235 (colored)

Make struct cmd local to cmd.c and move it out of tmux.h.

Revision 1.235 / (download) - annotate - [select for diffs], Thu Apr 9 15:35:27 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.234: +3 -3 lines
Diff to previous 1.234 (colored)

More style nits.

Revision 1.234 / (download) - annotate - [select for diffs], Thu Apr 9 13:53:50 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.233: +5 -3 lines
Diff to previous 1.233 (colored)

Some more, and use of wp->window before wp NULL check in format.c.

Revision 1.233 / (download) - annotate - [select for diffs], Wed Apr 8 11:26:07 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.232: +17 -1 lines
Diff to previous 1.232 (colored)

Restore pane_current_path format from portable tmux, it is no longer
used by default and is very useful.

Revision 1.232 / (download) - annotate - [select for diffs], Tue Mar 31 11:58:05 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.231: +2 -1 lines
Diff to previous 1.231 (colored)

Add session_path from Chris Ruegge in GitHub issue 2142.

Revision 1.231 / (download) - annotate - [select for diffs], Tue Mar 31 07:00:34 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.230: +6 -4 lines
Diff to previous 1.230 (colored)

Move alternate screen into the screen rather than the pane.

Revision 1.230 / (download) - annotate - [select for diffs], Sat Mar 28 09:39:27 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.229: +7 -1 lines
Diff to previous 1.229 (colored)

Add formats for top paste buffer by default. Also a tmux.1 fix from jmc.

Revision 1.229 / (download) - annotate - [select for diffs], Fri Mar 20 18:35:53 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.228: +5 -3 lines
Diff to previous 1.228 (colored)

Apply same menu items to view mode like copy mode.

Revision 1.228 / (download) - annotate - [select for diffs], Fri Mar 20 17:59:39 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.227: +21 -9 lines
Diff to previous 1.227 (colored)

Make the mouse_word and mouse_line formats work in copy mode and enable
the default pane menu in copy mode.

Revision 1.227 / (download) - annotate - [select for diffs], Thu Mar 19 13:43:18 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.226: +2 -2 lines
Diff to previous 1.226 (colored)

Add a flag to run a background process in a pty as well, not used for
anything yet.

Revision 1.226 / (download) - annotate - [select for diffs], Wed Mar 11 14:17:55 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.225: +115 -4 lines
Diff to previous 1.225 (colored)

Add some number operators for formats, from Tyler Culp.

Revision 1.225 / (download) - annotate - [select for diffs], Fri Feb 14 13:57:58 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.224: +41 -3 lines
Diff to previous 1.224 (colored)

Fix top/bottom pane calculation with pane border status enabled,
reported by Stanislav Spassov.

Revision 1.224 / (download) - annotate - [select for diffs], Tue Jan 28 10:44:30 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.223: +2 -1 lines
Diff to previous 1.223 (colored)

Reduce a difference with portable tmux by adding the -V flag and
#{version} format; on OpenBSD these just report the OpenBSD version.

Revision 1.223 / (download) - annotate - [select for diffs], Sun Jan 12 21:07:07 2020 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.222: +1 -4 lines
Diff to previous 1.222 (colored)

The terminal type was never as much use as I expected so remove it in
favour of a couple of flags for the features used (DECSLRM and DECFRA).
Also rename the flag for no xenl to be more obvious while here.

Revision 1.222 / (download) - annotate - [select for diffs], Thu Dec 26 14:48:29 2019 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.221: +4 -5 lines
Diff to previous 1.221 (colored)

Pass correct value into iterator callback for time formats.

Revision 1.221 / (download) - annotate - [select for diffs], Thu Dec 26 11:04:58 2019 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.220: +214 -1 lines
Diff to previous 1.220 (colored)

Add a number of new formats to inspect what sessions and clients a
window is present or active in. From Tyler Culp in GitHub issue 2034.

Revision 1.220 / (download) - annotate - [select for diffs], Thu Nov 28 21:18:38 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.219: +4 -5 lines
Diff to previous 1.219 (colored)

Do not crash when a format doesn't exist, reported by Thomas Sattler.

Revision 1.219 / (download) - annotate - [select for diffs], Thu Nov 28 09:45:15 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.218: +3 -1 lines
Diff to previous 1.218 (colored)

Make a best effort to set xpixel and ypixel for each pane and add
formats for them.

Revision 1.218 / (download) - annotate - [select for diffs], Thu Nov 28 09:05:34 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.217: +3 -1 lines
Diff to previous 1.217 (colored)

Store xpixel/ypixel from TIOCGWINSZ and add formats.

Revision 1.217 / (download) - annotate - [select for diffs], Mon Nov 25 15:04:15 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.216: +24 -3 lines
Diff to previous 1.216 (colored)

Add p format modifier for padding to width.

Revision 1.216 / (download) - annotate - [select for diffs], Mon Nov 25 15:02:48 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.215: +20 -15 lines
Diff to previous 1.215 (colored)

Allow multiple substitutions in a single format.

Revision 1.215 / (download) - annotate - [select for diffs], Fri Nov 15 11:21:32 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.214: +3 -2 lines
Diff to previous 1.214 (colored)

Do not add path if it is NULL, duh.

Revision 1.214 / (download) - annotate - [select for diffs], Fri Nov 15 11:16:53 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.213: +2 -1 lines
Diff to previous 1.213 (colored)

Handle OSC 7 (a VTE extension) and put the result in a new format (pane_path).

Revision 1.213 / (download) - annotate - [select for diffs], Wed Oct 23 07:42:05 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.212: +51 -26 lines
Diff to previous 1.212 (colored)

Use the existing code in format.c to add foramts for word and line at
cursor position in copy mode, from Anindya Mukherjee.

Revision 1.212 / (download) - annotate - [select for diffs], Mon Oct 14 09:24:06 2019 UTC (4 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.211: +2 -2 lines
Diff to previous 1.211 (colored)

Do not crash with pane_current_command if the pane is newly created and
has no shell set, from Thomas Adam.

Revision 1.211 / (download) - annotate - [select for diffs], Tue Sep 24 14:50:08 2019 UTC (4 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.210: +5 -1 lines
Diff to previous 1.210 (colored)

Mouse formats don't work in copy mode so don't try to use them.

Revision 1.210 / (download) - annotate - [select for diffs], Wed Sep 11 06:43:17 2019 UTC (4 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.209: +6 -1 lines
Diff to previous 1.209 (colored)

Add window_marked_flag, GitHub issue 1887.

Revision 1.209 / (download) - annotate - [select for diffs], Tue Sep 10 07:50:33 2019 UTC (4 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.208: +1 -2 lines
Diff to previous 1.208 (colored)

Set up format tree for %if, GitHub issue 1896.

Revision 1.208 / (download) - annotate - [select for diffs], Tue Jul 9 14:03:12 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.207: +7 -1 lines
Diff to previous 1.207 (colored)

Add a -H flag to send-keys to send literal keys given as hex numbers
(needed for control clients to send mouse sequences). Also add some
format flags for UTF-8 and SGR mouse mode. Requested by Bradley Smith in
GitHub issues 1832 and 1833.

Revision 1.207 / (download) - annotate - [select for diffs], Mon Jun 24 10:04:29 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.206: +12 -7 lines
Diff to previous 1.206 (colored)

Expand arguments to C and s format modifiers (matches m which already expands).

Revision 1.206 / (download) - annotate - [select for diffs], Thu Jun 20 11:59:59 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.205: +3 -1 lines
Diff to previous 1.205 (colored)

Add a per-pane option set. Pane options inherit from window options (so
there should be no change to existing behaviour) and are set and shown
with set-option -p and show-options -p.

Change remain-on-exit and window-style/window-active-style to be pane
options (some others will be changed later).

This makes select-pane -P and -g unnecessary so no longer document them
(they still work) and no longer document set-window-option and
show-window-options in favour of set-option -w and show-options -w.

Revision 1.205 / (download) - annotate - [select for diffs], Thu Jun 20 06:51:36 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.204: +3 -3 lines
Diff to previous 1.204 (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.204 / (download) - annotate - [select for diffs], Sat Jun 15 06:33:48 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.203: +2 -2 lines
Diff to previous 1.203 (colored)

Use the right format modifier when comparing, and remove a couple of
unused variables.

Revision 1.203 / (download) - annotate - [select for diffs], Thu Jun 13 21:24:09 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.202: +2 -2 lines
Diff to previous 1.202 (colored)

Do not crash if the environment variable is present but empty.

Revision 1.202 / (download) - annotate - [select for diffs], Thu Jun 13 19:46:00 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.201: +67 -43 lines
Diff to previous 1.201 (colored)

Add regular expression support for the format search, match and
substitute modifiers.

Revision 1.201 / (download) - annotate - [select for diffs], Fri May 31 21:41:17 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.200: +2 -4 lines
Diff to previous 1.200 (colored)

Fix warnings, from Ben Boeckel.

Revision 1.200 / (download) - annotate - [select for diffs], Tue May 28 07:18:42 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.199: +1 -52 lines
Diff to previous 1.199 (colored)

Change display-menu from taking a single string to a set of arguments,
which is much easier to work with. Based on a diff from Avi Halachmi.

Revision 1.199 / (download) - annotate - [select for diffs], Mon May 27 15:29:46 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.198: +1 -4 lines
Diff to previous 1.198 (colored)

Go less crazy with horizontal separators on default menus.

Revision 1.198 / (download) - annotate - [select for diffs], Sun May 26 18:43:43 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.197: +3 -3 lines
Diff to previous 1.197 (colored)

Add keys for new menu items.

Revision 1.197 / (download) - annotate - [select for diffs], Sun May 26 17:34:45 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.196: +144 -2 lines
Diff to previous 1.196 (colored)

Add formats for word and line under the mouse and use them to add some
items to the pane menu.

Revision 1.196 / (download) - annotate - [select for diffs], Sun May 26 12:02:42 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.195: +35 -15 lines
Diff to previous 1.195 (colored)

Add a way to append or prepend to a format if the length has been limited.

Revision 1.195 / (download) - annotate - [select for diffs], Sat May 25 16:51:10 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.194: +33 -8 lines
Diff to previous 1.194 (colored)

Add <, >, <=, >= for formats, GitHub issue 1747.

Revision 1.194 / (download) - annotate - [select for diffs], Mon May 13 20:07:02 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.193: +2 -2 lines
Diff to previous 1.193 (colored)

Always include Lock in the menu.

Revision 1.193 / (download) - annotate - [select for diffs], Fri May 10 18:09:51 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored)

Fix a typo in previous (, -> :).

Revision 1.192 / (download) - annotate - [select for diffs], Fri May 10 18:04:06 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.191: +49 -1 lines
Diff to previous 1.191 (colored)

Add support for simple menus usable with mouse or keyboard. New command
display-menu shows a menu (bound to the mouse on status line by default)
and a couple of extra formats for the default menus.

Revision 1.191 / (download) - annotate - [select for diffs], Thu May 9 08:38:13 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.190: +7 -1 lines
Diff to previous 1.190 (colored)

Add formats to show if pane is the marked pane and if any marked pane is set.

Revision 1.190 / (download) - annotate - [select for diffs], Fri May 3 20:44:24 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.189: +5 -2 lines
Diff to previous 1.189 (colored)

Allow panes to be empty (no command), output can be piped to them with
split-window or display-message -I.

Revision 1.189 / (download) - annotate - [select for diffs], Thu Apr 25 18:18:55 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.188: +13 -16 lines
Diff to previous 1.188 (colored)

Make options_tostring allocate its result instead of using a stack
buffer (needed for something in the future).

Revision 1.188 / (download) - annotate - [select for diffs], Fri Mar 29 09:33:24 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.187: +3 -1 lines
Diff to previous 1.187 (colored)

Free old strings after they have been expanded in format_choose.

Revision 1.187 / (download) - annotate - [select for diffs], Thu Mar 28 21:05:15 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.186: +18 -1 lines
Diff to previous 1.186 (colored)

Expand session and window formats for buffer filters.

Revision 1.186 / (download) - annotate - [select for diffs], Tue Mar 19 19:01:50 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.185: +18 -1 lines
Diff to previous 1.185 (colored)

Add a cursor_character format.

Revision 1.185 / (download) - annotate - [select for diffs], Mon Mar 18 20:53:33 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.184: +4 -4 lines
Diff to previous 1.184 (colored)

Extend the #[] style syntax and use that together with previous format
changes to allow the status line to be entirely configured with a single
option.

Now that it is possible to configure their content, enable the existing
code that lets the status line be multiple lines in height. The status
option can now take a value of 2, 3, 4 or 5 (as well as the previous on
or off) to configure more than one line. The new status-format array
option configures the format of each line, the default just references
the existing status-* options, although some of the more obscure status
options may be eliminated in time.

Additions to the #[] syntax are: "align" to specify alignment (left,
centre, right), "list" for the window list and "range" to configure
ranges of text for the mouse bindings.

The "align" keyword can also be used to specify alignment of entries in
tree mode and the pane status lines.

Revision 1.184 / (download) - annotate - [select for diffs], Mon Mar 18 14:10:25 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.183: +36 -2 lines
Diff to previous 1.183 (colored)

Add format variables for the default formats for the various modes
(tree_mode_format and so on) and add a -a flag to display-message to
list variables with values.

Revision 1.183 / (download) - annotate - [select for diffs], Mon Mar 18 09:46:42 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.182: +4 -2 lines
Diff to previous 1.182 (colored)

With force, kill previous job before starting new. Fixes problem
reported by Scott Mcdermott in GitHub issue 1627.

Revision 1.182 / (download) - annotate - [select for diffs], Fri Mar 15 15:02:25 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.181: +4 -1 lines
Diff to previous 1.181 (colored)

Copy recursion counter into new formats when looping.

Revision 1.181 / (download) - annotate - [select for diffs], Fri Mar 15 10:22:57 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.180: +2 -2 lines
Diff to previous 1.180 (colored)

Only print format logging when the flag is set, even if also sending to log_debug.

Revision 1.180 / (download) - annotate - [select for diffs], Fri Mar 15 10:07:24 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.179: +23 -6 lines
Diff to previous 1.179 (colored)

The pane and window loops need to pass the window and pane tags when
they build their format.

Revision 1.179 / (download) - annotate - [select for diffs], Fri Mar 15 10:04:13 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.178: +138 -48 lines
Diff to previous 1.178 (colored)

Add a -v flag to display-message to show verbose messages as the format
is parsed, this gives the user a way to debug problems with formats
rather than just being confronted with (for example) a blank status
line.

Revision 1.178 / (download) - annotate - [select for diffs], Thu Mar 14 23:34:41 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.177: +11 -1 lines
Diff to previous 1.177 (colored)

Add a limit on how far format_expand can recurse.

Revision 1.177 / (download) - annotate - [select for diffs], Thu Mar 14 23:14:27 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.176: +6 -7 lines
Diff to previous 1.176 (colored)

Store the time in the format tree rather than passing it around.

Revision 1.176 / (download) - annotate - [select for diffs], Thu Mar 14 21:41:30 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.175: +6 -1 lines
Diff to previous 1.175 (colored)

Add format flags for start and end window.

Revision 1.175 / (download) - annotate - [select for diffs], Thu Mar 14 21:31:43 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.174: +15 -6 lines
Diff to previous 1.174 (colored)

Add T format modifier like E but also do strftime(3).

Revision 1.174 / (download) - annotate - [select for diffs], Thu Mar 14 21:27:26 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.173: +3 -1 lines
Diff to previous 1.173 (colored)

Accept 0 time as a shorthand for now to format_expand_time.

Revision 1.173 / (download) - annotate - [select for diffs], Wed Mar 13 18:09:12 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.172: +3 -2 lines
Diff to previous 1.172 (colored)

Tweak format_replace logging.

Revision 1.172 / (download) - annotate - [select for diffs], Wed Mar 13 15:37:28 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.171: +136 -4 lines
Diff to previous 1.171 (colored)

Add formats to list sessions, windows or panes.

Revision 1.171 / (download) - annotate - [select for diffs], Wed Mar 13 14:27:17 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.170: +2 -2 lines
Diff to previous 1.170 (colored)

Apply length limits and substitution even to literal formats.

Revision 1.170 / (download) - annotate - [select for diffs], Wed Mar 13 14:19:54 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.169: +13 -2 lines
Diff to previous 1.169 (colored)

Add E: format to expand a format twice (useful to expand the value of an
option).

Revision 1.169 / (download) - annotate - [select for diffs], Wed Mar 13 14:10:34 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.168: +323 -177 lines
Diff to previous 1.168 (colored)

Make format parsing build the modifiers into a list, standardize how
arguments are given and allow multiple modifiers on a format (separated
by ;).

Revision 1.168 / (download) - annotate - [select for diffs], Tue Mar 12 11:16:50 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.167: +29 -11 lines
Diff to previous 1.167 (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.167 / (download) - annotate - [select for diffs], Thu Mar 7 20:24:21 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.166: +4 -4 lines
Diff to previous 1.166 (colored)

Add a separate mode struct for the active window mode if any.

Revision 1.166 / (download) - annotate - [select for diffs], Thu Mar 7 19:01:21 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.165: +3 -2 lines
Diff to previous 1.165 (colored)

Make adding mode formats a function pointer as well.

Revision 1.165 / (download) - annotate - [select for diffs], Mon Nov 19 13:35:41 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.164: +5 -1 lines
Diff to previous 1.164 (colored)

evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547.

Revision 1.164 / (download) - annotate - [select for diffs], Thu Oct 18 08:38:01 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.163: +26 -19 lines
Diff to previous 1.163 (colored)

Support for windows larger than visible on the attached client. This has
been a limitation for a long time.

There are two new options, window-size and default-size, and a new
command, resize-window. The force-width and force-height options and the
session_width and session_height formats have been removed.

The new window-size option tells tmux how to work out the size of
windows: largest means it picks the size of the largest session,
smallest the smallest session (similar to the old behaviour) and manual
means that it does not automatically resize windows. The default is
currently largest but this may change. aggressive-resize modifies the
choice of session for largest and smallest as it did before.

If a window is in a session attached to a client that is too small, only
part of the window is shown. tmux attempts to keep the cursor visible,
so the part of the window displayed is changed as the cursor moves (with
a small delay, to try and avoid excess redrawing when applications
redraw status lines or similar that are not currently visible). The
offset of the visible portion of the window is shown in status-right.

Drawing windows which are larger than the client is not as efficient as
those which fit, particularly when the cursor moves, so it is
recommended to avoid using this on slow machines or networks (set
window-size to smallest or manual).

The resize-window command can be used to resize a window manually. If it
is used, the window-size option is automatically set to manual for the
window (undo this with "setw -u window-size"). resize-window works in a
similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and
-A flags. -a sets the window to the size of the smallest client (what it
would be if window-size was smallest) and -A the largest.

For the same behaviour as force-width or force-height, use resize-window
-x or -y, and "setw -u window-size" to revert to automatic sizing..

If the global window-size option is set to manual, the default-size
option is used for new windows. If -x or -y is used with new-session,
that sets the default-size option for the new session.

The maximum size of a window is 10000x10000. But expect applications to
complain and much higher memory use if making a window excessively
big. The minimum size is the size required for the current layout
including borders.

The refresh-client command can be used to pan around a window, -U -D -L
-R moves up, down, left or right and -c returns to automatic cursor
tracking. The position is reset when the current window is changed.

Revision 1.163 / (download) - annotate - [select for diffs], Thu Sep 27 07:43:18 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.162: +3 -2 lines
Diff to previous 1.162 (colored)

Use same working directory rules for jobs as new windows rather than
always starting in home, GitHub issue 1488.

Revision 1.162 / (download) - annotate - [select for diffs], Mon Aug 27 11:03:34 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.161: +4 -2 lines
Diff to previous 1.161 (colored)

Memory leaks, from Gang Fan in GitHub issue 1453.

Revision 1.161 / (download) - annotate - [select for diffs], Sun Aug 26 09:28:42 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.160: +30 -1 lines
Diff to previous 1.160 (colored)

Add q: format prefix to escape sh(1) special characters. Suggested by
someone ages ago and then more recently in GitHub issue 1449.

Revision 1.160 / (download) - annotate - [select for diffs], Thu Aug 23 15:45:05 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.159: +8 -7 lines
Diff to previous 1.159 (colored)

Move job struct into job.c.

Revision 1.159 / (download) - annotate - [select for diffs], Sat Aug 18 16:14:03 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.158: +7 -6 lines
Diff to previous 1.158 (colored)

Some tidying and helper functions.

Revision 1.158 / (download) - annotate - [select for diffs], Wed Jul 4 09:44:07 2018 UTC (5 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.157: +3 -3 lines
Diff to previous 1.157 (colored)

Add accessors for grid linedata member, for some future work. From Dan
Aloni.

Revision 1.157 / (download) - annotate - [select for diffs], Wed Jun 27 17:36:10 2018 UTC (5 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.156: +9 -7 lines
Diff to previous 1.156 (colored)

Allow any punctuation (except :) as separator in s/x/y/, not only
/. From JINNOUCHI Yasushi in GitHub issue 1386.

Revision 1.156 / (download) - annotate - [select for diffs], Tue May 29 09:10:30 2018 UTC (5 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.155: +13 -3 lines
Diff to previous 1.155 (colored)

If foo doesn't exist and can't be expanded in #{?foo,a,b} then assume it
is false.

Revision 1.155 / (download) - annotate - [select for diffs], Tue May 22 08:49:12 2018 UTC (5 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.154: +31 -17 lines
Diff to previous 1.154 (colored)

Allow escaping , and } with # in #{}; GitHub issue 1332.

Revision 1.154 / (download) - annotate - [select for diffs], Wed Apr 18 14:35:37 2018 UTC (6 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.153: +4 -1 lines
Diff to previous 1.153 (colored)

Change how display-message uses the client. Originally it was only
intended as the target client where the message should be displayed but
at some point (perhaps when -p was added), it was used for format
expansion too. This means it can get a bit weird where you have client
formats expanding for a client with a different current session than the
target session.

However, it is nice that display-message can be used to show information
about a specific client. So change so that the -c client will be used if
the session matches the target session (-t or default), otherwise the
best client will be chosen.

Revision 1.153 / (download) - annotate - [select for diffs], Thu Mar 8 08:09:10 2018 UTC (6 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.152: +2 -2 lines
Diff to previous 1.152 (colored)

Add a missing client-detached hook when the server shuts down, and do
not exit until jobs started from run-shell/if-shell have finished (add a
job flags member and a flag to indicate other jobs). GitHub issue 1245.

Revision 1.152 / (download) - annotate - [select for diffs], Tue Feb 20 10:43:46 2018 UTC (6 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.151: +7 -4 lines
Diff to previous 1.151 (colored)

Do not leak memory when working out job name in formats.

Revision 1.151 / (download) - annotate - [select for diffs], Thu Jan 18 14:28:11 2018 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.150: +8 -3 lines
Diff to previous 1.150 (colored)

Discard all but the last line when reading from a #() command - the
callback is just going to be fired again straight away to go through all
the lines, it is better just to use the last one straight away.

Revision 1.150 / (download) - annotate - [select for diffs], Thu Nov 2 18:52:05 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.149: +5 -8 lines
Diff to previous 1.149 (colored)

Format for group list of "other sessions" is a bit weird, just list all
the sessions in the group.

Revision 1.149 / (download) - annotate - [select for diffs], Thu Nov 2 18:43:51 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.148: +5 -2 lines
Diff to previous 1.148 (colored)

Tweak previous slightly so that current session is chosen if it is in
the group rather than first.

Revision 1.148 / (download) - annotate - [select for diffs], Thu Nov 2 18:27:35 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.147: +39 -4 lines
Diff to previous 1.147 (colored)

Only show the first member of session groups in tree mode (-G flag
disables).

Revision 1.147 / (download) - annotate - [select for diffs], Thu Oct 12 11:32:27 2017 UTC (6 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.146: +7 -6 lines
Diff to previous 1.146 (colored)

Show exit status and time in the remain-on-exit pane text, mostly from
Timo Boettcher in GitHub issue 1103.

Revision 1.146 / (download) - annotate - [select for diffs], Wed Aug 9 11:43:45 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.145: +14 -5 lines
Diff to previous 1.145 (colored)

Add -F to choose-tree, choose-client, choose-buffer to specify the
format of each line, as well as adding a couple of formats needed for
the default display.

Revision 1.145 / (download) - annotate - [select for diffs], Wed Aug 2 11:10:48 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.144: +3 -5 lines
Diff to previous 1.144 (colored)

Add selection_present format so commands in copy mode can use it, GitHub
issue 1028.

Revision 1.144 / (download) - annotate - [select for diffs], Thu Jul 27 10:42:05 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.143: +5 -1 lines
Diff to previous 1.143 (colored)

Add pane_at_left/right/top/bottom formats, from Amos Bird.

Revision 1.143 / (download) - annotate - [select for diffs], Fri Jul 7 14:39:45 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.142: +2 -1 lines
Diff to previous 1.142 (colored)

Add a pane_pipe format to show if pipe-pane is active, GitHub issue 990.

Revision 1.142 / (download) - annotate - [select for diffs], Wed May 31 17:56:48 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.141: +2 -2 lines
Diff to previous 1.141 (colored)

Style and spacing nits.

Revision 1.141 / (download) - annotate - [select for diffs], Tue May 30 21:44:59 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.140: +2 -4 lines
Diff to previous 1.140 (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.140 / (download) - annotate - [select for diffs], Mon May 29 18:06:34 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.139: +40 -12 lines
Diff to previous 1.139 (colored)

Add ||, && format operators and C: to search pane content.

Revision 1.139 / (download) - annotate - [select for diffs], Mon May 29 15:43:48 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.138: +10 -1 lines
Diff to previous 1.138 (colored)

Add m: for fnmatch(3) format matching.

Revision 1.138 / (download) - annotate - [select for diffs], Fri May 12 22:43:15 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.137: +1 -2 lines
Diff to previous 1.137 (colored)

Remove an unused variable.

Revision 1.137 / (download) - annotate - [select for diffs], Fri May 12 22:42:46 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.136: +2 -1 lines
Diff to previous 1.136 (colored)

Reset updated flag when restarting job so new output is detected,
reported by Gregory Pakosz in GitHub issue 922.

Revision 1.136 / (download) - annotate - [select for diffs], Fri May 12 13:27:57 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.135: +6 -5 lines
Diff to previous 1.135 (colored)

Only redraw single client, and tweak some logging.

Revision 1.135 / (download) - annotate - [select for diffs], Fri May 12 10:45:38 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.134: +3 -3 lines
Diff to previous 1.134 (colored)

Store copy mode search string in pane so search-again command works even
if you exit and reenter copy mode (it doesn't remember the position,
just the search string), suggested by espie@.

Revision 1.134 / (download) - annotate - [select for diffs], Sun May 7 22:27:57 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.133: +4 -1 lines
Diff to previous 1.133 (colored)

Add a format for the name of the pane's mode, lets it be used as a
conditional for key bindings.

Revision 1.133 / (download) - annotate - [select for diffs], Fri May 5 11:59:47 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.132: +48 -21 lines
Diff to previous 1.132 (colored)

Add some formats to look at the session window stack, suggested by Scott
ROCHFORD.

Revision 1.132 / (download) - annotate - [select for diffs], Wed May 3 05:53:34 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.131: +3 -1 lines
Diff to previous 1.131 (colored)

Add a format for the last search string in copy mode and fix the prompt
so it can work when in -I, suggested by Suraj N Kurapati.

Revision 1.131 / (download) - annotate - [select for diffs], Mon May 1 12:20:55 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.130: +57 -13 lines
Diff to previous 1.130 (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.130 / (download) - annotate - [select for diffs], Fri Apr 21 14:01:19 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.129: +7 -5 lines
Diff to previous 1.129 (colored)

Store state shared between multiple commands in the queue in a shared
structure.

Revision 1.129 / (download) - annotate - [select for diffs], Thu Apr 20 09:43:45 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.128: +7 -7 lines
Diff to previous 1.128 (colored)

Now that struct winlink has a session pointer, can remove some arguments.

Revision 1.128 / (download) - annotate - [select for diffs], Thu Apr 20 09:39:07 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.127: +2 -7 lines
Diff to previous 1.127 (colored)

There is no real need for window_printable_flags to allocate, make it
return a buffer from the stack.

Revision 1.127 / (download) - annotate - [select for diffs], Thu Apr 20 09:20:22 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.126: +39 -10 lines
Diff to previous 1.126 (colored)

If a #() command doesn't exit, use its most recent line of output (it
must be a full line). Don't let it redraw the status line more than once
a second.

Requested by someone about 10 years ago...

Revision 1.126 / (download) - annotate - [select for diffs], Wed Apr 19 06:52:27 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.125: +4 -2 lines
Diff to previous 1.125 (colored)

When the data we have buffered to write to a terminal grows beyond a
reasonable amount (currently width * height * 8 bytes), discard all
output to the terminal and start trying to redraw periodically
instead. Continue with this until the amount of data we are trying to
write falls to a low level again.

This helps to prevent tmux sitting on a huge buffer of data when there
are processes with fast output running inside tmux but the outside
terminal is slow.

A new client_discarded format holds the amount of data that has been
discarded due to this mechanism.

The three variables (when to start this, when to stop, and how often to
redraw) are basically "works for me" at the moment, this is going in to
see how it goes and if it causes problems for anyone else.

Revision 1.125 / (download) - annotate - [select for diffs], Tue Apr 18 15:44:17 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.124: +2 -1 lines
Diff to previous 1.124 (colored)

Add a format for number of bytes writtent to client, useful for debugging.

Revision 1.124 / (download) - annotate - [select for diffs], Wed Apr 5 10:49:46 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.123: +3 -3 lines
Diff to previous 1.123 (colored)

Give each client a name. This defaults to the tty name as before but
falls back to an alternative if the tty name is not available. This is
clearer than overloading the client ttyname member and allows us to
remove the path stored in the tty struct, it should always be the same
as the client.

Revision 1.123 / (download) - annotate - [select for diffs], Wed Mar 8 13:36:12 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.122: +17 -2 lines
Diff to previous 1.122 (colored)

Add a helper function for the most common format_create/defaults/expand
pattern.

Revision 1.122 / (download) - annotate - [select for diffs], Thu Feb 9 15:04:53 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.121: +3 -3 lines
Diff to previous 1.121 (colored)

Instead of numbering session groups, give them a name which may be given
to -t instead of a target session. Also allow them to contain only one
session.

Revision 1.121 / (download) - annotate - [select for diffs], Tue Feb 7 18:06:42 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.120: +3 -4 lines
Diff to previous 1.120 (colored)

Remove a debugging leftover.

Revision 1.120 / (download) - annotate - [select for diffs], Fri Feb 3 11:57:27 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.119: +12 -2 lines
Diff to previous 1.119 (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.119 / (download) - annotate - [select for diffs], Wed Feb 1 09:55:07 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.118: +4 -2 lines
Diff to previous 1.118 (colored)

Implement "all event" (1003) mouse mode but in a way that works. The
main issue is that if we have two panes, A with 1002 and B with 1003, we
need to set 1003 outside tmux in order to get all the mouse events, but
then we need to suppress the ones that pane A doesn't want. This is easy
in SGR mouse mode, because buttons == 3 is only used for movement events
(for other events the trailing m/M marks a release instead), but in
normal mouse mode we can't tell so easily. So for that, look at the
previous event instead - if it is drag+release as well, then the current
event is a movement event.

Revision 1.118 / (download) - annotate - [select for diffs], Mon Jan 30 21:41:17 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.117: +2 -2 lines
Diff to previous 1.117 (colored)

When a flag option is used in a format, it should use the number form
not string.

Revision 1.117 / (download) - annotate - [select for diffs], Mon Jan 16 14:49:14 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.116: +2 -2 lines
Diff to previous 1.116 (colored)

getopt() has a struct option so just return to using options_entry.

Revision 1.116 / (download) - annotate - [select for diffs], Sun Jan 15 20:48:41 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.115: +11 -21 lines
Diff to previous 1.115 (colored)

Major tidy up and rework of options tree and set-option/show-options
commands this pushes more of the code into options.c and ties it more
closely to the options table rather than having an unnecessary
split. Also add support for array options (will be used later). Only
(intentional) user visible change is that show-options output is now
passed through vis(3) with VIS_DQ so quotes are escaped.

Revision 1.115 / (download) - annotate - [select for diffs], Wed Jan 11 16:09:57 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.114: +13 -8 lines
Diff to previous 1.114 (colored)

Add a format for terminal type.

Revision 1.114 / (download) - annotate - [select for diffs], Mon Jan 9 21:03:25 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.113: +90 -28 lines
Diff to previous 1.113 (colored)

Add simple comparisons in formats: #{==:a,b} and #{!=:a,b} ("a" and "b"
are expanded so can compare formats). And expand the condition to
#{?a,b,c} (the "a" part) if it doesn't work as a simple lookup.

Also add FORMAT_NOJOBS flag to disable jobs in a format.

Revision 1.113 / (download) - annotate - [select for diffs], Thu Nov 17 10:06:08 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.112: +21 -15 lines
Diff to previous 1.112 (colored)

Key running commands for #() by the unexpanded command, and run them
again if the expanded form changes (otherwise at most once per second as
usual). Fixes issues reported by Gregory Pakosz.

Revision 1.112 / (download) - annotate - [select for diffs], Sun Oct 16 19:36:37 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.111: +16 -3 lines
Diff to previous 1.111 (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.111 / (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.110: +6 -6 lines
Diff to previous 1.110 (colored)

Mass rename struct cmd_q to struct cmdq_item and related.

Revision 1.110 / (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.109: +4 -7 lines
Diff to previous 1.109 (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.109 / (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.108: +2 -2 lines
Diff to previous 1.108 (colored)

Some other stuff that can be local to one file.

Revision 1.108 / (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.107: +65 -60 lines
Diff to previous 1.107 (colored)

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

Revision 1.107 / (download) - annotate - [select for diffs], Mon May 23 20:39:26 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.106: +5 -14 lines
Diff to previous 1.106 (colored)

Use a fixed buffer for strftime() because there is no portable way to
tell if the buffer is too small, and an expanding buffer is overkill
anyway.

Revision 1.106 / (download) - annotate - [select for diffs], Fri Apr 29 14:05:24 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.105: +6 -1 lines
Diff to previous 1.105 (colored)

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

Revision 1.105 / (download) - annotate - [select for diffs], Sun Jan 31 09:54:46 2016 UTC (8 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.104: +9 -5 lines
Diff to previous 1.104 (colored)

Support negative trim values (#{=-10:pane_title}) to trim from the end,
suggested by Kevin Brubeck Unhammer.

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

I no longer use my SourceForge address so replace it.

Revision 1.103 / (download) - annotate - [select for diffs], Sat Dec 12 18:32:24 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.102: +4 -2 lines
Diff to previous 1.102 (colored)

Add key-table option to set the default key table for a session, allows
different key bindings for different sessions and a few other things.

Revision 1.102 / (download) - annotate - [select for diffs], Fri Dec 11 12:27:36 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.101: +5 -2 lines
Diff to previous 1.101 (colored)

Add cmdq as an argument to format_create and add a format for the
command name (will also be used for more later).

Revision 1.101 / (download) - annotate - [select for diffs], Tue Dec 8 08:34:18 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.100: +2 -9 lines
Diff to previous 1.100 (colored)

Remove format_create_flags and just pass flags to format_create.

Revision 1.100 / (download) - annotate - [select for diffs], Tue Nov 24 21:52:06 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.99: +3 -1 lines
Diff to previous 1.99 (colored)

Remove the -I part of show-messages which isn't really that useful; the
server start time can now be accessed with a new start_time format (use:
tmux display -p '#{t:start_time}')

Revision 1.99 / (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.98: +5 -5 lines
Diff to previous 1.98 (colored)

Use __unused rather than rolling our own.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Nov 18 14:13:55 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.97: +67 -15 lines
Diff to previous 1.97 (colored)

Add s/foo/bar/: prefix for formats to substitute bar for foo.

Revision 1.97 / (download) - annotate - [select for diffs], Fri Nov 13 12:18:52 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.96: +3 -2 lines
Diff to previous 1.96 (colored)

Two spacing and spelling nits.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Nov 13 10:00:26 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.95: +16 -1 lines
Diff to previous 1.95 (colored)

Add window_visible_layout which ignores zoomed panes and use it for
control mode (which needs to know all panes), from George Nachman.

Revision 1.95 / (download) - annotate - [select for diffs], Fri Nov 13 08:09:28 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.94: +2 -1 lines
Diff to previous 1.94 (colored)

Long overdue change to the way we store cells in the grid: now, instead
of storing a full grid_cell with UTF-8 data and everything, store a new
type grid_cell_entry. This can either be the cell itself (for ASCII
cells), or an offset into an extended array (per line) for UTF-8
data.

This avoid a large (8 byte) overhead on non-UTF-8 cells (by far the
majority for most users) without the complexity of the shadow array we
had before. Grid memory without any UTF-8 is about half.

The disadvantage that cells can no longer be modified in place and need
to be copied out of the grid and back but it turned out to be lot less
complicated than I expected.

Revision 1.94 / (download) - annotate - [select for diffs], Thu Nov 12 11:09:11 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.93: +3 -4 lines
Diff to previous 1.93 (colored)

Nuke the utf8 and status-utf8 options and make tmux only a UTF-8
terminal. We still support non-UTF-8 terminals outside tmux, but inside
it is always UTF-8 (as when the utf8 and status-utf8 options were on).

Revision 1.93 / (download) - annotate - [select for diffs], Thu Nov 12 11:07:10 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.92: +1 -3 lines
Diff to previous 1.92 (colored)

Remove the mouse_utf8_flag format as well.

Revision 1.92 / (download) - annotate - [select for diffs], Sat Oct 31 08:13:58 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

Because pledge(2) does not allow us to pass directory file descriptors
around, we can't use file descriptors for the working directory because
we will be unable to pass it to a privileged process to tell it where to
read or write files or spawn children. So move tmux back to using
strings for the current working directory. We try to check it exists
with access() when it is set but ultimately fall back to ~ if it fails
at time of use (or / if that fails too).

Revision 1.91 / (download) - annotate - [select for diffs], Wed Oct 28 09:51:55 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored)

Like options, move the environ struct into environ.c.

Revision 1.90 / (download) - annotate - [select for diffs], Tue Oct 27 15:58:42 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.89: +7 -7 lines
Diff to previous 1.89 (colored)

Move struct options into options.c.

Revision 1.89 / (download) - annotate - [select for diffs], Tue Oct 27 09:28:31 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.88: +20 -14 lines
Diff to previous 1.88 (colored)

Count brackets in #{?...} so that nested conditional formats work, from
Daniel De Graaf.

Revision 1.88 / (download) - annotate - [select for diffs], Tue Oct 27 09:18:06 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.87: +3 -1 lines
Diff to previous 1.87 (colored)

The format callback may not always succeed, so we need to check for
NULL. From Patrick Palka.

Revision 1.87 / (download) - annotate - [select for diffs], Sun Oct 25 22:29:17 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.86: +149 -98 lines
Diff to previous 1.86 (colored)

Extend the modifiers allowed before formats: as well as the existing
#{=10:...}  length limit, add #{t:...} to convert a time_t format to a
string, #{b:...} for basename and #{d:...} for dirname. Remove all the
foo_string time formats as they can now be replaced by "t:", for example
#{window_activity_string} becomes #{t:window_activity}.

Revision 1.86 / (download) - annotate - [select for diffs], Sun Oct 25 08:59:26 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.85: +13 -11 lines
Diff to previous 1.85 (colored)

Pass output from jobs through format_expand() so they are expanded again
(this was the previous behaviour).

Revision 1.85 / (download) - annotate - [select for diffs], Fri Oct 23 16:02:21 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.84: +6 -2 lines
Diff to previous 1.84 (colored)

Format for scroll position, from Jorge Morante.

Revision 1.84 / (download) - annotate - [select for diffs], Mon Sep 14 10:25:52 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.83: +12 -8 lines
Diff to previous 1.83 (colored)

Make refresh-client force update of jobs, from Sina Siadat.

Revision 1.83 / (download) - annotate - [select for diffs], Thu Sep 10 08:58:14 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.82: +8 -1 lines
Diff to previous 1.82 (colored)

Add session_last_attached time and format, from Sina Siadat.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Sep 3 14:30:23 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.81: +2 -3 lines
Diff to previous 1.81 (colored)

A couple of style nits.

Revision 1.81 / (download) - annotate - [select for diffs], Sat Aug 29 09:25:00 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.80: +5 -3 lines
Diff to previous 1.80 (colored)

Move struct paste_buffer out of tmux.h.

Revision 1.80 / (download) - annotate - [select for diffs], Fri Aug 28 17:01:42 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.79: +107 -64 lines
Diff to previous 1.79 (colored)

Make a few more expensive (ish) formats functions instead of inline.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Aug 28 16:46:40 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.78: +127 -50 lines
Diff to previous 1.78 (colored)

Allow formats to be specified as functions (in the code) so they are
only evaluated on demand rather than each time a format tree is
constructed. Use this for expensive formats like pane_current_command.

Revision 1.78 / (download) - annotate - [select for diffs], Fri Aug 28 12:16:28 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored)

Run status update on a per-client timer at status-interval.

Revision 1.77 / (download) - annotate - [select for diffs], Fri Aug 28 11:38:27 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.76: +17 -2 lines
Diff to previous 1.76 (colored)

Move format job cleanup onto its own timer.

Revision 1.76 / (download) - annotate - [select for diffs], Fri Aug 28 10:06:52 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.75: +15 -5 lines
Diff to previous 1.75 (colored)

Allow environment variables in #{}.

Revision 1.75 / (download) - annotate - [select for diffs], Mon Jul 13 15:37:26 2015 UTC (8 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.74: +3 -1 lines
Diff to previous 1.74 (colored)

Add a format to show if client is a control client. From Bruno Sutic.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Jun 18 23:55:24 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored)

Use xsnprintf.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Jun 15 10:58:01 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.72: +6 -1 lines
Diff to previous 1.72 (colored)

Add window_activity format, from Thomas Adam based on a diff originally
from propos6 at gmail dot com.

Revision 1.72 / (download) - annotate - [select for diffs], Sun Jun 14 10:07:44 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.71: +3 -1 lines
Diff to previous 1.71 (colored)

Add a format for client PID (client_pid) and server PID (pid). Diff for
client_pid from Thomas Adam.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Jun 10 12:56:04 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.70: +2 -3 lines
Diff to previous 1.70 (colored)

wp->tty is a char [] not a char * so it can't be NULL. From Thomas Adam.

Revision 1.70 / (download) - annotate - [select for diffs], Fri May 29 23:26:52 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.69: +1 -12 lines
Diff to previous 1.69 (colored)

Don't use special strings if #() commands fail, just remove the format
(as if the command produced nothing). Makes constructions that can fail
like '#(test whatever && echo foo)' work as they did before.

Revision 1.69 / (download) - annotate - [select for diffs], Fri May 29 23:12:38 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.68: +7 -3 lines
Diff to previous 1.68 (colored)

Expand formats again inside #(), and free the temporaries.

Revision 1.68 / (download) - annotate - [select for diffs], Wed May 27 13:28:04 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.67: +177 -17 lines
Diff to previous 1.67 (colored)

Move the jobs output cache into the formats code so that #() work more
generally (for example, again working in set-titles-string).

Revision 1.67 / (download) - annotate - [select for diffs], Wed May 20 06:39:02 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

Return empty string if format is empty rather than attempting to
allocate zero bytes.

Revision 1.66 / (download) - annotate - [select for diffs], Tue May 12 15:29:29 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.65: +21 -1 lines
Diff to previous 1.65 (colored)

Add a session_alerts format which is a list of all the alerts in the
current session in symbolic form (something like "0!,4~,5!"). Use this
in the default set-titles-string. Prompted by a request from Jan ONDREJ.

Revision 1.65 / (download) - annotate - [select for diffs], Fri May 8 16:18:04 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.64: +1 -3 lines
Diff to previous 1.64 (colored)

Move input parser structs into input.c (removing fairly useless
saved_cursor_[xy] formats as a side-effect).

Revision 1.64 / (download) - annotate - [select for diffs], Wed May 6 08:35:39 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.63: +2 -1 lines
Diff to previous 1.63 (colored)

Add a format window_linked which is 1 if a window has been linked
multiple times, also remove the default space in window_flags and use a
conditional to add it in window-status-format (this means additional
flags can be added in the option without extra spaces). From Thomas Adam
with tweaks by me.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Apr 21 22:38:49 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.62: +5 -2 lines
Diff to previous 1.62 (colored)

Always format real layout even when zoomed.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Apr 21 15:18:38 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.61: +3 -1 lines
Diff to previous 1.61 (colored)

Put mouse_any_flag back, don't know where it went to (still in man page).

Revision 1.61 / (download) - annotate - [select for diffs], Mon Apr 20 15:34:56 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.60: +6 -2 lines
Diff to previous 1.60 (colored)

Support for multiple key tables to commands to be bound to sequences of
keys. The default key bindings become the "prefix" table and -n the
"root" table. Keys may be bound in new tables with bind -T and
switch-client -T used to specify the table in which the next key should
be looked up. Based on a diff from Keith Amling.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Mar 31 17:58:36 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.59: +22 -13 lines
Diff to previous 1.59 (colored)

Add a helper function to convert time, and add session_activity formats
(the latter from Takatoshi Matsumoto).

Revision 1.59 / (download) - annotate - [select for diffs], Tue Mar 31 17:45:10 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.58: +16 -16 lines
Diff to previous 1.58 (colored)

Fix some format specifier nits, from Ben Boeckel.

Revision 1.58 / (download) - annotate - [select for diffs], Fri Feb 6 17:11:39 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.57: +31 -1 lines
Diff to previous 1.57 (colored)

Add format_expand_time and use it instead of status_replace where
command execution is not needed.

Revision 1.57 / (download) - annotate - [select for diffs], Thu Feb 5 10:29:43 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.56: +39 -11 lines
Diff to previous 1.56 (colored)

Wrap all the individual format_* calls in a single format_defaults
functions.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Jan 11 04:14:40 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

correctly use HOST_NAME_MAX.

Some notes:
POSIX HOST_NAME_MAX doesn't include the NUL.
POSIX LOGIN_NAME_MAX and TTY_NAME_MAX do include the NUL.

BSD MAXHOSTNAMELEN includes the NUL.  Actually, most of the historical
BSD MAX* defines did include the NUL, except for the historical
mistake of utmp fields without NULs in the string, which directly led
to strncpy..  just showing how error prone this kind of accounting is.
CSRG did right.  Somehow POSIX missed the memo on the concepts of
carefulness and consistancy, and we are still paying the price when
people trip over this.  Of course, glibc is even more amazing (that is
a hint to blackhats)

ok guenther

Revision 1.55 / (download) - annotate - [select for diffs], Tue Dec 9 19:23:35 2014 UTC (9 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.54: +8 -2 lines
Diff to previous 1.54 (colored)

Add pane_dead_status for exit status of dead panes.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Dec 2 23:19:45 2014 UTC (9 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.53: +64 -14 lines
Diff to previous 1.53 (colored)

Permit option values to be used in formats.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Dec 1 14:30:18 2014 UTC (9 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

Check ZOOMED flag on window.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Nov 8 12:50:38 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.51: +3 -2 lines
Diff to previous 1.51 (colored)

Empty strings should be false too for #{?}, from Marc Finet.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Oct 25 08:47:04 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.50: +2 -1 lines
Diff to previous 1.50 (colored)

Add pane_input_off format, from Anish R Athalye.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Oct 8 17:35:58 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.49: +5 -5 lines
Diff to previous 1.49 (colored)

Add xreallocarray and remove nmemb argument from xrealloc.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Sep 8 14:29:05 2014 UTC (9 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.48: +5 -2 lines
Diff to previous 1.48 (colored)

Add window_last_flag and window_zoomed_flag. From John Morrissey.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Aug 9 07:33:37 2014 UTC (9 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.47: +1 -3 lines
Diff to previous 1.47 (colored)

Remove support for the continuous reporting "any" mouse mode which never
really worked properly and is rarely used.

Revision 1.47 / (download) - annotate - [select for diffs], Tue May 27 12:49:36 2014 UTC (9 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.46: +8 -1 lines
Diff to previous 1.46 (colored)

Add some formats for pane bounds.

Revision 1.46 / (download) - annotate - [select for diffs], Tue May 13 08:08:32 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.45: +6 -4 lines
Diff to previous 1.45 (colored)

If multiple arguments are given to new-session, new-window,
split-window, respawn-window or respawn-pane, pass them directly to
execvp() to help avoid quoting problems. One argument still goes to "sh
-c" like before. Requested by many over the years. Patch from J Raynor.

Revision 1.45 / (download) - annotate - [select for diffs], Tue May 13 07:34:35 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.44: +2 -1 lines
Diff to previous 1.44 (colored)

Add support for named buffers. If you don't name a buffer, things work
much as before - buffers are automatically named "buffer0000",
"buffer0001" and so on and ordered as a stack. Buffers can be named
explicitly when creating ("loadb -b foo" etc) or renamed ("setb -b
buffer0000 -n foo"). If buffers are named explicitly, they are not
deleted when buffer-limit is reached. Diff from J Raynor.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Apr 17 15:37:55 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.43: +9 -6 lines
Diff to previous 1.43 (colored)

Add some UTF-8 utility functions and use them to prevent the width limit
on formats from splitting UTF-8 characters improperly.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Apr 17 07:36:45 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.42: +1 -3 lines
Diff to previous 1.42 (colored)

Remove the monitor-content option and associated bits and bobs. It's
never worked very well. If there is a big demand for it to return, will
consider better ways to do it.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Apr 2 18:12:18 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.41: +7 -5 lines
Diff to previous 1.41 (colored)

Support UTF-8 with choose-buffer, from Kosuke ASAMI. Also make
buffer_sample bigger to let it trim at window right edge.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Mar 31 21:37:55 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.40: +3 -5 lines
Diff to previous 1.40 (colored)

Make session_attached a count and add session_many_attached flag.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Nov 24 11:29:09 2013 UTC (10 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.39: +8 -1 lines
Diff to previous 1.39 (colored)

Replace ## by # in format.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Oct 11 08:03:43 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.38: +5 -2 lines
Diff to previous 1.38 (colored)

And get it right this time... don't leak if it is an empty string either.

Revision 1.38 / (download) - annotate - [select for diffs], Fri Oct 11 08:01:29 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

Don't free the pane name by accident.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Oct 10 23:31:03 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.36: +5 -3 lines
Diff to previous 1.36 (colored)

Fix leak in format_get_command.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Oct 10 12:39:24 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.35: +1 -4 lines
Diff to previous 1.35 (colored)

Remove the KERN_PROC_CWD the proc_current_path format (which is the only
thing that uses it now).

Revision 1.35 / (download) - annotate - [select for diffs], Thu Oct 10 12:35:31 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Use format_get_command() and some spacing tweaks.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Oct 10 12:26:35 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.33: +1 -4 lines
Diff to previous 1.33 (colored)

Alter how tmux handles the working directory to internally use file
descriptors rather than strings.

- Each session still has a current working directory.

- New sessions still get their working directory from the client that
  created them or its attached session if any.

- New windows are created by default in the session working directory.

- The -c flag to new, neww, splitw allows the working directory to be
  overridden.

- The -c flag to attach let's the session working directory be changed.

- The default-path option has been removed.

To get the equivalent to default-path '.', do:

        bind c neww -c $PWD

To get the equivalent of default-path '~', do:

        bind c neww -c ~

This also changes the client identify protocol to be a set of messages rather
than one as well as some other changes that should make it easier to make
backwards-compatible protocol changes in future.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Oct 10 12:04:01 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

First period not last for host_short, from Michael Scholz.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Oct 10 11:56:50 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.31: +42 -13 lines
Diff to previous 1.31 (colored)

Add automatic-rename-format option allowing automatic rename to use
something other than pane_current_command.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Oct 10 11:50:36 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.30: +17 -8 lines
Diff to previous 1.30 (colored)

Allow nested format expansion.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Oct 10 11:50:20 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.29: +35 -7 lines
Diff to previous 1.29 (colored)

Add length limit operator for formats.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Oct 10 11:47:52 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.28: +10 -1 lines
Diff to previous 1.28 (colored)

Add formats for window flags.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Oct 10 11:47:28 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.27: +9 -2 lines
Diff to previous 1.27 (colored)

Don't leak formats if they are added multiple times.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Oct 10 11:47:11 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.26: +5 -3 lines
Diff to previous 1.26 (colored)

Don't add client formats when they are NULL.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jul 5 15:27:14 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.25: +3 -1 lines
Diff to previous 1.25 (colored)

Add pane_synchronized format, from Romain Francoise.

Revision 1.25 / (download) - annotate - [select for diffs], Fri May 31 19:46:42 2013 UTC (10 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.24: +56 -20 lines
Diff to previous 1.24 (colored)

Add host_short format, from Tiago Cunha.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Apr 17 14:52:31 2013 UTC (11 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.23: +4 -4 lines
Diff to previous 1.23 (colored)

(long long) and %lld for time_t output
ok nicm

Revision 1.23 / (download) - annotate - [select for diffs], Mon Mar 25 11:40:54 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Include prefix on ids, from George Nachman.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Mar 25 10:11:45 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)

Rename session idx to session id throughout and add $ prefix to targets
to use it, extended from a diff from George Nachman.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Mar 25 10:07:21 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.20: +6 -3 lines
Diff to previous 1.20 (colored)

Do not leak command in formats, from Romain Francoise.

Revision 1.20 / (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.19: +3 -5 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Sun Mar 24 09:29:40 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.18: +29 -3 lines
Diff to previous 1.18 (colored)

Add pane_tabs format to format_window_pane based on code from George
Nachman.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Mar 24 09:23:00 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

Whoops fix build.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Mar 24 09:19:51 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.16: +4 -1 lines
Diff to previous 1.16 (colored)

Add pane_current_command format.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Mar 22 16:03:35 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.15: +42 -8 lines
Diff to previous 1.15 (colored)

Add a load of miscellaneous pane formats, from George Nachman.

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

Add client_session and client_last_session formats.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Mar 21 16:14:09 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.13: +3 -1 lines
Diff to previous 1.13 (colored)

Add a format client_prefix which is 1 if prefix key has been
pressed, used for example #{?client_prefix,X,Y}. Also a few extra
server_client_status needed.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Mar 21 16:13:24 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored)

Allow formats in status options.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Feb 5 11:01:45 2013 UTC (11 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.11: +6 -3 lines
Diff to previous 1.11 (colored)

Don't set some string formats if the string is NULL.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jan 18 02:16:21 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.10: +1 -2 lines
Diff to previous 1.10 (colored)

Rather than having two grids for each pane, one for ASCII and one for
UTF-8, collapse the two together. Simplifies the code at the expense of
more memory (which can probably be reduced again later).

Revision 1.10 / (download) - annotate - [select for diffs], Mon Sep 24 13:05:10 2012 UTC (11 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

Use pgrp of pty fd not pid of immediate child when recovering current
working directory (like current process). From Marcel Partap.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jul 10 11:53:01 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.8: +11 -10 lines
Diff to previous 1.8 (colored)

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

Revision 1.8 / (download) - annotate - [select for diffs], Tue May 22 11:35:37 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.7: +13 -1 lines
Diff to previous 1.7 (colored)

Switch all of the various choose- and list- commands over to the format
infrastructure, from Thomas Adam.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 1 10:42:39 2012 UTC (12 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored)

Add pane_current_path format, suggested by Mikolaj Kucharski.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Feb 2 00:03:45 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Get client_width and client_height the right way round, from Stephen
Thirlwall.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 30 09:39:34 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)

Give each window a unique id, like panes but prefixed with @. Based on
work from George Nachman.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Nov 15 23:21:52 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.3: +6 -1 lines
Diff to previous 1.3 (colored)

Add a pane_index format string and use it, from Ben Boeckel.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Oct 23 01:12:46 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.2: +37 -1 lines
Diff to previous 1.2 (colored)

Add client formats, from Ben Boeckel.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Oct 2 06:55:48 2011 UTC (12 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.1: +7 -1 lines
Diff to previous 1.1 (colored)

Add a few more formats for panes (tty, pid, start cmd/cwd).

Revision 1.1 / (download) - annotate - [select for diffs], Fri Aug 26 10:53:16 2011 UTC (12 years, 8 months ago) by nicm
Branch: MAIN

Add initial framework for more powerful formatting of command output and
use it for list-{panes,windows,sessions}. This allows more descriptive
replacements (such as #{session_name}) and conditionals.

Later this will be used for status_replace and list-keys and other
places.

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.