aboutsummaryrefslogtreecommitdiff
path: root/cmd-display-message.c
Commit message (Collapse)AuthorAge
* Handle splitw -I correctly when used from an attached client, GitHubnicm2021-10-07
| | | | issue 2917.
* Add args parsing callback for some future work, currently unused.nicm2021-08-21
|
* Hide struct args behind a couple of accessor functions.nicm2021-08-20
|
* Missing argument specifier for -c.nicm2021-08-14
|
* Add a flag to disable keys to close a message, GitHub issue 2625.nicm2021-04-12
|
* When display-message used in config file, show the message after thenicm2021-04-07
| | | | config file finishes. GitHub issue 2637.
* Add a -d option to display-message to set delay, from theonekeyg atnicm2020-07-27
| | | | gmail dot com in GitHub issue 2322.
* Support embedded styles in the display-message message, GitHub issuenicm2020-05-16
| | | | 2206.
* Make client -c and -t handling common in cmd-queue.c and try to benicm2020-04-13
| | | | | clearer about whether the client is the target client (must have a session) or not.
* Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make itsnicm2020-04-13
| | | | use more clearly defined and preparation for some future work).
* Make struct cmd local to cmd.c and move it out of tmux.h.nicm2020-04-13
|
* Remove a leftover abort and some fixes from cppcheck.nicm2019-05-30
|
* Allow panes to be empty (no command), output can be piped to them withnicm2019-05-03
| | | | split-window or display-message -I.
* Add format variables for the default formats for the various modesnicm2019-03-18
| | | | | (tree_mode_format and so on) and add a -a flag to display-message to list variables with values.
* Add a -v flag to display-message to show verbose messages as the formatnicm2019-03-15
| | | | | | 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.
* Store the time in the format tree rather than passing it around.nicm2019-03-14
|
* Accept 0 time as a shorthand for now to format_expand_time.nicm2019-03-14
|
* Remove unnecessary brackets.nicm2018-04-23
|
* Change how display-message uses the client. Originally it was onlynicm2018-04-18
| | | | | | | | | | | | | 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.
* In order that people can use formats like #D in #() in the status linenicm2017-05-01
| | | | | | | | | | | | | | 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.
* Get rid of the extra layer of flags and cmd_prepare() and just store thenicm2017-04-22
| | | | | | CMD_FIND_* flags in the cmd_entry and call it for the command. Commands with special requirements call it themselves and update the target for hooks to use.
* Add a window or pane id "tag" to each format tree and use it to separatenicm2017-02-03
| | | | | | 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.
* Mass rename struct cmd_q to struct cmdq_item and related.nicm2016-10-16
|
* Trying to do hooks generically is way too complicated and unreliable andnicm2016-10-13
| | | | | | | | | | | | | | | | | | confusing, particularly trying to automatically figure out what target hooks should be using. So simplify it: - drop before hooks entirely, they don't seem to be very useful; - commands with special requirements now fire their own after hook (for example, if they change session or window, or if they have -t and -s and need to choose which one the hook uses as current target); - commands with no special requirements can have the CMD_AFTERHOOK flag added and they will use the -t state. At the moment new-session, new-window, split-window fire their own hook, and display-message uses the flag. The remaining commands still need to be looked at.
* Add static in cmd-* and fix a few other nits.nicm2016-10-10
|
* Do not crash if display-message used without a client, issue reported bynicm2016-08-25
| | | | Serge Aleynikov, fix from Thomas Adam.
* Instead of combined flags for -c, -s, -t, split into different setsnicm2015-12-14
| | | | using an enum and simplify the parsing code.
* Use member names in cmd_entry definitions so I stop getting confusednicm2015-12-13
| | | | about the order.
* -c needs to be able for fail for display-message.nicm2015-12-13
|
* Instead of every command resolving the target (-t or -s) itself, preparenicm2015-12-13
| | | | | | | | | | | | | | | | the state (client, session, winlink, pane) for it it before entering the command. Each command provides some flags that tell the prepare step what it is expecting. This is a requirement for having hooks on commands (for example, if you hook "select-window -t1:2", the hook command should to operate on window 1:2 not whatever it thinks is the current window), and should allow some other target improvements. The old cmd_find_* functions remain for the moment but that layer will be dropped later. Joint work with Thomas Adam.
* Add cmdq as an argument to format_create and add a format for thenicm2015-12-11
| | | | command name (will also be used for more later).
* Remove format_create_flags and just pass flags to format_create.nicm2015-12-08
|
* Use format_expand_time for display-message.nicm2015-11-18
|
* Rewrite of the target resolution internals to be simpler and morenicm2015-04-27
| | | | | | | consistent but with much less duplication, but keeping the same internal API. Also adds more readable aliases for some of the special tokens used in targets (eg "{start}" instead of "^"). Some behaviours may have changed, for example prefix matches now happen before fnmatch.
* Wrap all the individual format_* calls in a single format_defaultsnicm2015-02-05
| | | | functions.
* Move template defines back into .c files.nicm2014-10-20
|
* Instead of setting up the default keys by building the key structnicm2014-10-20
| | | | | | | | | directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a temporary cmd_q. As well as being smaller, this will allow default bindings to be command sequences which will probably be needed soon.
* Trivial style and spacing nits.nicm2013-10-10
|
* Handle no client better in display-message.Nicholas Marriott2013-03-25
|
* Add a command queue to standardize and simplify commands that call otherNicholas Marriott2013-03-24
| | | | | | | | | | | | | | | | | | | | | | 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.
* Fix error reporting for client commands by adding a flag toNicholas Marriott2013-03-24
| | | | | cmd_find_client to tell it whether or not to show errors, sometimes it's needed and sometimes not.
* Use the CMD_*_USAGE defines consistently, from Thomas Adam.Nicholas Marriott2012-12-09
|
* Use a separate define for each default format template and strip clutterNicholas Marriott2012-08-14
| | | | from the choose-tree defaults.
* Make command exec functions return an enum rather than -1/0/1 values andNicholas Marriott2012-07-11
| | | | | | add a new value to mean "leave client running but don't attach" to fix problems with using some commands in a command sequence. Most of the work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
* xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott2012-07-10
|
* Switch all of the various choose- and list- commands over to the formatNicholas Marriott2012-05-22
| | | | infrastructure, from Thomas Adam.
* Terminate strftime buffer properly and free format string, whoops. FromNicholas Marriott2012-03-03
| | | | Tiago Cunha.
* Use format for display-message, based on a diff from George Nachman.Nicholas Marriott2012-02-23
|
* Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0'Miod Vallat2011-04-06
| | | | for chars.
* Change -t on display-message to be target-pane for the #[A-Z]Nicholas Marriott2011-03-29
| | | | replacements and add -c as target-client.