summaryrefslogtreecommitdiffstats
path: root/format.c
AgeCommit message (Collapse)Author
2015-11-12Nuke the utf8 and status-utf8 options and make tmux only a UTF-8nicm
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).
2015-11-12Remove the mouse_utf8_flag format as well.nicm
2015-10-31Because pledge(2) does not allow us to pass directory file descriptorsnicm
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).
2015-10-28Like options, move the environ struct into environ.c.nicm
2015-10-27Move struct options into options.c.nicm
2015-10-27Count brackets in #{?...} so that nested conditional formats work, fromnicm
Daniel De Graaf.
2015-10-27The format callback may not always succeed, so we need to check fornicm
NULL. From Patrick Palka.
2015-10-25Extend the modifiers allowed before formats: as well as the existingnicm
#{=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}.
2015-10-25Pass output from jobs through format_expand() so they are expanded againnicm
(this was the previous behaviour).
2015-10-23Format for scroll position, from Jorge Morante.nicm
2015-09-14Make refresh-client force update of jobs, from Sina Siadat.nicm
2015-09-10Add session_last_attached time and format, from Sina Siadat.nicm
2015-09-03A couple of style nits.nicm
2015-08-29Move struct paste_buffer out of tmux.h.nicm
2015-08-28Make a few more expensive (ish) formats functions instead of inline.nicm
2015-08-28Allow formats to be specified as functions (in the code) so they arenicm
only evaluated on demand rather than each time a format tree is constructed. Use this for expensive formats like pane_current_command.
2015-08-28Run status update on a per-client timer at status-interval.nicm
2015-08-28Move format job cleanup onto its own timer.nicm
2015-08-28Allow environment variables in #{}.nicm
2015-07-13Add a format to show if client is a control client. From Bruno Sutic.nicm
2015-06-18Use xsnprintf.nicm
2015-06-15Add window_activity format, from Thomas Adam based on a diff originallynicm
from propos6 at gmail dot com.
2015-06-14Add a format for client PID (client_pid) and server PID (pid). Diff fornicm
client_pid from Thomas Adam.
2015-06-10wp->tty is a char [] not a char * so it can't be NULL. From Thomas Adam.nicm
2015-05-29Don't use special strings if #() commands fail, just remove the formatnicm
(as if the command produced nothing). Makes constructions that can fail like '#(test whatever && echo foo)' work as they did before.
2015-05-29Expand formats again inside #(), and free the temporaries.nicm
2015-05-27Move the jobs output cache into the formats code so that #() work morenicm
generally (for example, again working in set-titles-string).
2015-05-20Return empty string if format is empty rather than attempting tonicm
allocate zero bytes.
2015-05-12Add a session_alerts format which is a list of all the alerts in thenicm
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.
2015-05-08Move input parser structs into input.c (removing fairly uselessnicm
saved_cursor_[xy] formats as a side-effect).
2015-05-06Add a format window_linked which is 1 if a window has been linkednicm
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.
2015-04-21Always format real layout even when zoomed.nicm
2015-04-21Put mouse_any_flag back, don't know where it went to (still in man page).nicm
2015-04-20Support for multiple key tables to commands to be bound to sequences ofnicm
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.
2015-03-31Add a helper function to convert time, and add session_activity formatsnicm
(the latter from Takatoshi Matsumoto).
2015-03-31Fix some format specifier nits, from Ben Boeckel.nicm
2015-02-06Add format_expand_time and use it instead of status_replace wherenicm
command execution is not needed.
2015-02-05Wrap all the individual format_* calls in a single format_defaultsnicm
functions.
2015-01-11correctly use HOST_NAME_MAX.deraadt
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
2014-12-09Add pane_dead_status for exit status of dead panes.nicm
2014-12-02Permit option values to be used in formats.nicm
2014-12-01Check ZOOMED flag on window.nicm
2014-11-08Empty strings should be false too for #{?}, from Marc Finet.nicm
2014-10-25Add pane_input_off format, from Anish R Athalye.nicm
2014-10-08Add xreallocarray and remove nmemb argument from xrealloc.nicm
2014-09-08Add window_last_flag and window_zoomed_flag. From John Morrissey.nicm
2014-08-09Remove support for the continuous reporting "any" mouse mode which nevernicm
really worked properly and is rarely used.
2014-05-27Add some formats for pane bounds.nicm
2014-05-13If multiple arguments are given to new-session, new-window,nicm
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.
2014-05-13Add support for named buffers. If you don't name a buffer, things worknicm
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.