aboutsummaryrefslogtreecommitdiff
path: root/cmd-pipe-pane.c
Commit message (Collapse)AuthorAge
...
| * 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.
* | Merge branch 'obsd-master'Thomas Adam2015-12-11
|\|
| * 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).
* | Merge branch 'obsd-master'Thomas Adam2015-12-08
|\|
| * Remove format_create_flags and just pass flags to format_create.nicm2015-12-08
| |
* | Merge branch 'obsd-master'Thomas Adam2015-11-18
|\|
| * Use __unused rather than rolling our own.nicm2015-11-18
| |
* | No paths.h on Solaris.Nicholas Marriott2015-02-06
|/
* Add format_expand_time and use it instead of status_replace wherenicm2015-02-06
| | | | command execution is not needed.
* Remove two unused arguments from status_replace.nicm2015-02-01
|
* 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.
* Remove the barely-used and unnecessary command check() function.nicm2013-10-10
|
* 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.
* No more lint means no more ARGSUSED.Nicholas Marriott2013-03-22
|
* 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.
* Missing -o on usage for pipe-pane, from Tiago Cunha.Nicholas Marriott2011-10-27
|
* Do not require a client here, or pipe-pane will not work from theNicholas Marriott2011-07-30
| | | | command line.
* Change -t on display-message to be target-pane for the #[A-Z]Nicholas Marriott2011-03-29
| | | | replacements and add -c as target-client.
* Move all calls to fcntl(...O_NONBLOCK) into a function and clear theNicholas Marriott2011-01-08
| | | | | flag on the stdio file descriptors before closing them (fixes things like "tmux ls && cat").
* 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.
* Trying to set FD_CLOEXEC on every fd is a lost cause, just useNicholas Marriott2010-10-16
| | | | closefrom() before exec.
* Do not call event_del() for signals after fork(), just use sigaction()Nicholas Marriott2010-08-19
| | | | | directly instead - calling libevent functions after fork() w/o event_reinit() is a bad idea, even if in this case it was harmless.
* Last change erroneously used the target argument for looking up theNicholas Marriott2010-06-14
| | | | | | | 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.
* Support the status_replace # replacement sequences in the pipe-paneNicholas Marriott2010-06-05
| | | | command, thanks to Andrea Barisani.
* Put this back in with the initialisation in the right order.Nicholas Marriott2010-05-04
|
* Revert last change, it appears to be broken somehow.Nicholas Marriott2010-05-04
|
* Make signal handler setup/teardown two common functions instead of six,Nicholas Marriott2010-05-03
| | | | | and reset SIGCHLD after fork to fix problems with some shells. From Romain Francois.
* Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott2009-12-03
| | | | | time now I've configured emacs to make them displayed in really annoying colours...
* Remove a couple of unused arguments where possible, and add /* ARGSUSED */ toNicholas Marriott2009-11-26
| | | | the rest to reduce lint output.
* 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.
* Unreachable statement, found by lint.Nicholas Marriott2009-11-13
|
* Convert the window pane (pty master side) fd over to use a bufferevent.Nicholas Marriott2009-11-04
| | | | | 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.
* Switch window pane pipe redirect fd over to a bufferevent.Nicholas Marriott2009-11-04
|
* Initial changes to move tmux to libevent.Nicholas Marriott2009-11-04
| | | | | | | | | 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.
* Nuke dead store.Nicholas Marriott2009-10-21
|
* Add a pipe-pane command to allow a pane to be piped to a shell command, forNicholas Marriott2009-10-11
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@.