summaryrefslogtreecommitdiffstats
path: root/cmd-respawn-pane.c
AgeCommit message (Collapse)Author
2021-08-27Replace %% in command lists (by copying them) for template arguments ,nicm
this means they can be used with {} as well. Also make argument processing from an existing vector preserve commands. GitHub issue 2858.
2021-08-21Rename a member to match what it will be in future.nicm
2021-08-21Add args parsing callback for some future work, currently unused.nicm
2021-08-20Hide struct args behind a couple of accessor functions.nicm
2021-08-20Expose args_value struct (will be needed soon) and add some missing frees.nicm
2020-05-16Drop having a separate type for style options and make them all strings,nicm
which allows formats to be expanded. Any styles without a '#{' are still validated when they are set but any with a '#{' are not. Formats are not expanded usefully in many cases yet, that will be changed later. To make this work, a few other changes: - set-option -a with a style option automatically appends a ",". - OSC 10 and 11 don't set the window-style option anymore, instead the fg and bg are stored in the pane struct and act as the defaults that can be overridden by window-style. - status-fg and -bg now override status-style instead of trying to keep them in sync.
2020-04-13Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make itsnicm
use more clearly defined and preparation for some future work).
2020-04-13Make struct cmd local to cmd.c and move it out of tmux.h.nicm
2020-03-31Add a way to mark environment variables as "hidden" so they can be usednicm
by tmux but are not passed into the environment of new panes.
2019-04-28Support multiple occurances of the same argument. Use this for a newnicm
flag -e to new-window, split-window, respawn-window, respawn-pane to pass environment variables into the newly created process. From Steffen Christgau in GitHub issue 1697.
2019-04-17Break new window and pane creation common code from various commands andnicm
window.c into a separate file spawn.c.
2019-03-12Allow multiple modes to be open in a pane. A stack of open modes is keptnicm
and the previous restored when the top is exited. If a mode that is already on the stack is entered, the existing instance is moved to the top as the active mode rather than being opened new.
2017-07-21Add -c for respawn-pane and respawn-window, from J Raynor.nicm
2017-04-25Do not update TERM into config file parsing has finished.nicm
2017-04-22Get rid of the extra layer of flags and cmd_prepare() and just store thenicm
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.
2017-03-09Move server_fill_environ into environ.c and move some other common codenicm
into it.
2016-10-16Mass rename struct cmd_q to struct cmdq_item and related.nicm
2016-10-10Add static in cmd-* and fix a few other nits.nicm
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-14Instead of combined flags for -c, -s, -t, split into different setsnicm
using an enum and simplify the parsing code.
2015-12-13Use member names in cmd_entry definitions so I stop getting confusednicm
about the order.
2015-12-13Instead of every command resolving the target (-t or -s) itself, preparenicm
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.
2015-10-31Because pledge(2) does not allow us to pass directory file descriptorsnicm
around, we can't use file descriptors for the working directory because we will be unable to pass it to a privileged process to tell it where to read or write files or spawn children. So move tmux back to using strings for the current working directory. We try to check it exists with access() when it is set but ultimately fall back to ~ if it fails at time of use (or / if that fails too).
2015-10-28Like options, move the environ struct into environ.c.nicm
2015-03-31Fix some format specifier nits, from Ben Boeckel.nicm
2014-10-20Missed a couple of cmd_entry struct members from previous.nicm
2014-05-13If multiple arguments are given to new-session, new-window,nicm
split-window, respawn-window or respawn-pane, pass them directly to execvp() to help avoid quoting problems. One argument still goes to "sh -c" like before. Requested by many over the years. Patch from J Raynor.
2014-04-17Set PATH explicitly, either from client or sessionnicm
environment. Previously it came from the session environment. From J Raynor.
2013-10-10Pass -1 for cwd now not NULL.nicm
2013-10-10Remove the barely-used and unnecessary command check() function.nicm
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.
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-03-17$Id$ -> $OpenBSD$.Nicholas Marriott
2011-11-15Make window_pane_index work the same as window_index, from Ben Boeckel.Nicholas Marriott
2011-07-09Unused variable.Nicholas Marriott
2011-07-04Use screen_reinit for respawn-pane to keep history and call input_initNicholas Marriott
for respawn-window to break out of waiting for DCS/OSC to finish.
2011-06-05Add a respawn-pane command, from Marcel Partap.Nicholas Marriott