summaryrefslogtreecommitdiffstats
path: root/cmd-list.c
AgeCommit message (Collapse)Author
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-11-27Do not set a limit on the length of commands when printing them.nicm
2014-09-01Various minor style and spacing nits.nicm
2014-04-11Don't blindly increase offsets by the return value of snprintf, if therenicm
wasn't enough space this will go off the end. Instead clamp to the available space. Fixes crash reported by Julien Rebetez.
2013-03-24Add a command queue to standardize and simplify commands that call otherNicholas Marriott
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.
2013-03-22Add functions to allocate and free command contexts rather than doing itNicholas Marriott
all on the stack.
2012-07-13Add a queue of notifys and a way to turn them off and on (we do not wantNicholas Marriott
notifys to happen during some commands). Based on code from George Nachman.
2012-07-11Make command exec functions return an enum rather than -1/0/1 values andNicholas Marriott
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.
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2012-06-18Add a skeleton mode to tmux (called "control mode") that let's tmuxNicholas Marriott
commands be sent and output received on stdout. This can be used to integrate with other terminal emulators and should allow some other things to be made simpler later. More to come so doesn't do much yet and deliberately not documented.
2010-10-29We now send argv to the server after parsing it in the client to get theNicholas Marriott
command, so the client should not modify it. Instead, take a copy. Fixes parsing command lists, reported by mcbride@.
2010-06-26Setting the cmdlist pointer in the bind-key to NULL to prevent it being freedNicholas Marriott
after the command is executing is bogus because it may still be needed if the same command is going to be executed again (for example if you "bind-key a bind-key b ..."). Making a copy is hard, so instead add a reference count to the cmd_list. While here, also print bind-key -n and the rest of the flags properly. Fixes problem reported by mcbride@.
2010-03-22Reset output functions too when changing client after attaching, toNicholas Marriott
avoid crash if a command in a sequence after new/attach causes output.
2010-01-30Don't stop parsing command sequences when a command requests the client toNicholas Marriott
stick around (attach-session/new-session).
2009-07-26Make all messages sent between the client and server fixed size.Nicholas Marriott
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.
2009-06-01Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott
terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti