aboutsummaryrefslogtreecommitdiff
path: root/cmd-display-message.c
Commit message (Collapse)AuthorAge
* Handle no client better in display-message.Nicholas Marriott2013-03-14
|
* Don't let display-message crash if no client, from George Nachman.Nicholas Marriott2013-03-14
|
* Add a command queue to standardize and simplify commands that call otherNicholas Marriott2013-02-23
| | | | | | | | | | | | | | | | | | | | 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 to cmd_find_client toNicholas Marriott2013-02-22
| | | | tell it whether or not to show errors, sometimes it's needed and sometimes not.
* Allow display-message with no curclient.Nicholas Marriott2013-02-22
|
* Merge branch 'obsd-master'Thomas Adam2012-12-31
|\ | | | | | | Sync from OpenBSD.
| * 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.
| * Clean up and simplify tmux command argument parsing.Nicholas Marriott2011-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server to be executed. The parsing was later moved into the server (an argv was sent from the client), but the parse step and intermediate struct was kept. This change removes that struct and the separate parse step. Argument parsing and printing is now common to all commands (in arguments.c) with each command left with just an optional check function (to validate the arguments at parse time), the exec function and a function to set up any key bindings (renamed from the old init function). This is overall more simple and consistent. There should be no changes to any commands behaviour or syntax although as this touches every command please watch for any unexpected changes.
| * Add a -p flag to display-message to print the output rather than displaying inNicholas Marriott2009-11-24
| | | | | | | | | | the status line, this allows things like "display -p '#W'" to find the current window index.
| * Two new options, window-status-format and window-status-current-format, whichNicholas Marriott2009-11-19
| | | | | | | | | | | | | | | | allow the format of each window in the status line window list to be controlled using similar # sequences as status-left/right. This diff also moves part of the way towards UTF-8 support in window names but it isn't quite there yet.
| * Don't interpret #() for display-message, it usually doesn't make sense and mayNicholas Marriott2009-11-19
| | | | | | | | leak commands.
| * Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in theNicholas Marriott2009-11-13
| | | | | | | | command entry structs and a couple of functions to check/set the flags.
| * Rather than running status-left, status-right and window title #() with popenNicholas Marriott2009-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | immediately every redraw, queue them up and run them in the background, starting each once every status-interval. The actual status line uses the output from the last run. This brings several advantages: - tmux itself may be called from inside #() without causing the server to hang; - likewise, sleep or similar doesn't cause the server to block; - commands aren't run excessively often when redrawing; - commands shared by status-left and status-right, or used multiple times, will only be run once. run-shell and if-shell still use system()/popen() but will be changed over to use this too later.
| * Make all messages sent between the client and server fixed size.Nicholas Marriott2009-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first of two changes to make the protocol more resilient and less sensitive to other changes in the code, particularly with commands. The client now packs argv into a buffer and sends it to the server for parsing, rather than doing it itself and sending the parsed command data. As a side-effect this also removes a lot of now-unused command marshalling code. Mixing a server without this change and a client with or vice versa will cause tmux to hang or crash, please ensure that tmux is entirely killed before upgrading.
| * - New command display-message (alias display) to display a message in theNicholas Marriott2009-07-17
| | | | | | | | | | status line (bound to "i" and displays the current window and time by default). The same substitutions are applied as for status-left/right. - Add support for including the window index (#I), pane index (#P) and window name (#W) in the message, and status-left or status-right. - Bump protocol version. From Tiago Cunha, thanks!
* Sync OpenBSD patchset 1162:Tiago Cunha2012-08-31
| | | | | | Use a separate define for each default format template and strip clutter from the choose-tree defaults.
* Sync OpenBSD patchset 1151:Tiago Cunha2012-07-11
| | | | | | | | Make command exec functions return an enum rather than -1/0/1 values and add a new value to mean "leave client running but don't attach" to fix problems with using some commands in a command sequence. Most of the work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
* Sync OpenBSD patchset 1150:Tiago Cunha2012-07-11
| | | | | xfree is not particularly helpful, remove it. From Thomas Adam.
* Sync OpenBSD patchset 1119:Tiago Cunha2012-05-22
| | | | | | Switch all of the various choose- and list- commands over to the format infrastructure, from Thomas Adam.
* Sync OpenBSD patchset 1038:Tiago Cunha2012-03-07
| | | | | | Terminate strftime buffer properly and free format string, whoops. From Tiago Cunha.
* Sync OpenBSD patchset 1031:Tiago Cunha2012-03-03
| | | | | Use format for display-message, based on a diff from George Nachman.
* Expand the Id keyword. Tiago Cunha2011-07-09
|
* |PatchSet 883Nicholas Marriott2011-04-06
| | | | | | | | | | | |Date: 2011/04/06 12:36:26 |Author: miod |Branch: HEAD |Tag: (none) |Log: |Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0' |for chars.
* |PatchSet 876Nicholas Marriott2011-04-06
| | | | | | | | | | | |Date: 2011/03/29 20:30:16 |Author: nicm |Branch: HEAD |Tag: (none) |Log: |Change -t on display-message to be target-pane for the #[A-Z] |replacements and add -c as target-client.
* Sync OpenBSD patchset 829:Tiago Cunha2011-01-07
| | | | | | | | | | | | | | | | | | | | | | Clean up and simplify tmux command argument parsing. Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server to be executed. The parsing was later moved into the server (an argv was sent from the client), but the parse step and intermediate struct was kept. This change removes that struct and the separate parse step. Argument parsing and printing is now common to all commands (in arguments.c) with each command left with just an optional check function (to validate the arguments at parse time), the exec function and a function to set up any key bindings (renamed from the old init function). This is overall more simple and consistent. There should be no changes to any commands behaviour or syntax although as this touches every command please watch for any unexpected changes.
* Sync OpenBSD patchset 561:Tiago Cunha2009-11-28
| | | | | | | Add a -p flag to display-message to print the output rather than displaying in the status line, this allows things like "display -p '#W'" to find the current window index.
* Sync OpenBSD patchset 553:Tiago Cunha2009-11-19
| | | | | | | | | | Two new options, window-status-format and window-status-current-format, which allow the format of each window in the status line window list to be controlled using similar # sequences as status-left/right. This diff also moves part of the way towards UTF-8 support in window names but it isn't quite there yet.
* Sync OpenBSD patchset 549:Tiago Cunha2009-11-19
| | | | | | Don't interpret #() for display-message, it usually doesn't make sense and may leak commands.
* Sync OpenBSD patchset 539:Tiago Cunha2009-11-14
| | | | | | Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in the command entry structs and a couple of functions to check/set the flags.
* Sync OpenBSD patchset 374:Tiago Cunha2009-10-11
| | | | | | | | | | | | | | | | | | | Rather than running status-left, status-right and window title #() with popen immediately every redraw, queue them up and run them in the background, starting each once every status-interval. The actual status line uses the output from the last run. This brings several advantages: - tmux itself may be called from inside #() without causing the server to hang; - likewise, sleep or similar doesn't cause the server to block; - commands aren't run excessively often when redrawing; - commands shared by status-left and status-right, or used multiple times, will only be run once. run-shell and if-shell still use system()/popen() but will be changed over to use this too later.
* Sync OpenBSD patchset 181:Tiago Cunha2009-07-28
| | | | | | | | | | | | | | | | | Make all messages sent between the client and server fixed size. This is the first of two changes to make the protocol more resilient and less sensitive to other changes in the code, particularly with commands. The client now packs argv into a buffer and sends it to the server for parsing, rather than doing it itself and sending the parsed command data. As a side-effect this also removes a lot of now-unused command marshalling code. Mixing a server without this change and a client with or vice versa will cause tmux to hang or crash, please ensure that tmux is entirely killed before upgrading.
* - New command display-message (alias display) to display a message in theTiago Cunha2009-07-17
status line (bound to "i" by default). - Add support for including the window index, pane index, and window name in status-left, or status-right. - Bump protocol version.