aboutsummaryrefslogtreecommitdiff
path: root/cmd-pipe-pane.c
Commit message (Collapse)AuthorAge
* 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.
* No more lint means no more ARGSUSED.Nicholas Marriott2013-02-17
|
* 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 973:Tiago Cunha2011-10-31
| | | | | Missing -o on usage for pipe-pane, from Tiago Cunha.
* Sync OpenBSD patchset 940:Tiago Cunha2011-08-04
| | | | | | Do not require a client here, or pipe-pane will not work from the command line.
* Expand the Id keyword. Tiago Cunha2011-07-09
|
* |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 834:Tiago Cunha2011-01-21
| | | | | | | Move all calls to fcntl(...O_NONBLOCK) into a function and clear the flag on the stdio file descriptors before closing them (fixes things like "tmux ls && cat").
* 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 775:Tiago Cunha2010-10-24
| | | | | | Trying to set FD_CLOEXEC on every fd is a lost cause, just use closefrom() before exec.
* Sync OpenBSD patchset 751:Tiago Cunha2010-08-29
| | | | | | | Do not call event_del() for signals after fork(), just use sigaction() directly instead - calling libevent functions after fork() w/o event_reinit() is a bad idea, even if in this case it was harmless.
* Sync OpenBSD patchset 720:Tiago Cunha2010-06-15
| | | | | | | | | Last change erroneously used the target argument for looking up the client which caused pipe-pane to fail when used from the command line. Instead pass NULL which should use the current client. Spotted by Tiago Cunha.
* Sync OpenBSD patchset 715:Tiago Cunha2010-06-06
| | | | | | Support the status_replace # replacement sequences in the pipe-pane command, thanks to Andrea Barisani.
* Sync OpenBSD patchset 696:Tiago Cunha2010-05-14
| | | | | | | Make signal handler setup/teardown two common functions instead of six, and reset SIGCHLD after fork to fix problems with some shells. From Romain Francoise.
* Sync OpenBSD patchset 581:Tiago Cunha2009-12-04
| | | | | | | Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last time now I've configured emacs to make them displayed in really annoying colours...
* Sync OpenBSD patchset 567:Tiago Cunha2009-11-28
| | | | | | Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to the rest to reduce lint output.
* 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 538:Tiago Cunha2009-11-14
| | | | | Unreachable statement, found by lint.
* Sync OpenBSD patchset 498:Tiago Cunha2009-11-08
| | | | | | | | Convert the window pane (pty master side) fd over to use a bufferevent. The evbuffer API is very similar to the existing tmux buffer API so this was remarkably painless. Not many possible ways to do it, I suppose.
* Sync OpenBSD patchset 496:Tiago Cunha2009-11-08
| | | | | Switch window pane pipe redirect fd over to a bufferevent.
* Sync OpenBSD patchset 491:Tiago Cunha2009-11-08
| | | | | | | | | | | | Initial changes to move tmux to libevent. This moves the client-side loops are pretty much fully over to event-based only (tmux.c and client.c) but server-side (server.c and friends) treats libevent as a sort of clever poll, waking up after every event to run various things. Moving the server stuff over to bufferevents and timers and so on will come later.
* Sync OpenBSD patchset 430:Tiago Cunha2009-10-23
| | | | | Nuke dead store.
* No paths.h in here, as well.Tiago Cunha2009-10-12
|
* Sync OpenBSD patchset 387:Tiago Cunha2009-10-12
Add a pipe-pane command to allow a pane to be piped to a shell command, for example: pipe-pane 'cat >~/out' No arguments stops outputing and closes the pipe; the -o flag toggles a pipe and on and off (useful for key bindings). Suggested by espie@.