summaryrefslogtreecommitdiffstats
path: root/cmd-run-shell.c
AgeCommit message (Collapse)Author
2023-08-23Add -c to run-shell to set working directory, from someone in GitHubnicm
issue 3661.
2022-06-02Do not attempt to use client in config file (it will be NULL), GitHubnicm
issue 3206.
2022-05-30Add a way for lines added to copy mode to be passed through the parsernicm
to handle escape sequences and use it for run-shell, GitHub issue 3156.
2021-10-11Add -e flag to set environment for popup, from Alexis Hildebrandt innicm
GitHub issue 2924.
2021-09-16Fix run-shell -d with no command, GitHub issue 2885.nicm
2021-09-15For the moment, restore if-shell and run-shell to parsing at the lastnicm
moment (when the shell command completes) rather than when first invoked, GitHub issue 2872.
2021-09-09Expand argument to run-shell again.nicm
2021-08-25Validate command argument types (string or command list) and give morenicm
useful error messages.
2021-08-23Move command argument parsing common functions and don't bother to parsenicm
again if given a command rather than a string.
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-13Set return code for confirm-before and make command-prompt also block,nicm
GitHub issue 2822.
2021-04-12Add a flag to disable keys to close a message, GitHub issue 2625.nicm
2021-03-15Do not crash if there is no item to show command error, from Anindyanicm
Mukherjee.
2021-03-02Drop support for popups where the content is provided directly to tmuxnicm
(which does not have many practical uses) and only support running a program in the popup. display-popup is now simpler and can accept multiple arguments to avoid escaping problems (like the other commands).
2021-01-01Add a -C flag to run-shell to use a tmux command rather than a shell command.nicm
2020-06-12Do not wait on shutdown for commands started with run -b.nicm
2020-05-16Add a customize mode where keys and options may be browsed and changed,nicm
includes adding a brief description of each option. Bound to "C" by default.
2020-04-13Make client -c and -t handling common in cmd-queue.c and try to benicm
clearer about whether the client is the target client (must have a session) or not.
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-04-10Now that copy mode copies the pane content rather than keeping anicm
reference to it, it isn't necessary that the pane in copy mode is the same as the one copying from. Add a -s flag to copy-mode to specify a different pane for the source content. This means it is possible to view two places in a pane's history at the same time in different panes, or copy from a pane's history into an editor or shell in the same pane. From Anindya Mukherjee.
2020-03-21Preserve exit status from run-shell and pass to the client.nicm
2020-03-19Add a flag to run a background process in a pty as well, not used fornicm
anything yet.
2020-03-13Do not add a reference to the session if no session is present.nicm
2020-03-12Add a -d flag to run-shell to wait for delay before running the command,nicm
also allow run-shell to accept no command to just delay.
2019-06-18Add a cmdq_continue function rather than twiddling the flag directly.nicm
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.
2019-03-08Make the mode used to view command output (a variant of copy mode) usenicm
its own mode definition struct with a different init function rather than calling special setup functions.
2019-03-07Tidy changing the mode into window_copy_init_for_output.nicm
2018-08-27Memory leaks, from Gang Fan in GitHub issue 1453.nicm
2018-08-23Move job struct into job.c.nicm
2018-05-24Make server_client_get_cwd used (almost) everywhere we need to work outnicm
the cwd, and do not fall back to "." as it is pretty useless. GitHub issue 1331.
2018-03-08Add a missing client-detached hook when the server shuts down, and donicm
not exit until jobs started from run-shell/if-shell have finished (add a job flags member and a flag to indicate other jobs). GitHub issue 1245.
2017-08-30Pass flags into cmd_find_from_* to fix prefer-unattached, reported bynicm
Thomas Sattler.
2017-05-30Rewrite of choose mode, both to simplify and tidy the code and to addnicm
some modern features. Now the common code is in mode-tree.c, which provides an API used by the three modes now separated into window-{buffer,client,tree}.c. Buffer mode shows buffers, client mode clients and tree mode a tree of sessions, windows and panes. Each mode has a common set of key bindings plus a few that are specific to the mode. Other changes are: - each mode has a preview pane: for buffers this is the buffer content (very useful), for others it is a preview of the pane; - items may be sorted in different ways ('O' key); - multiple items may be tagged and an operation applied to all of them (for example, to delete multiple buffers at once); - in tree mode a command may be run on the selected item (session, window, pane) or on tagged items (key ':'); - displayed items may be filtered in tree mode by using a format (this is used to implement find-window) (key 'f'); - the custom format (-F) for the display is no longer available; - shortcut keys change from 0-9, a-z, A-Z which was always a bit weird with keys used for other uses to 0-9, M-a to M-z. Now that the code is simpler, other improvements will come later. Primary key bindings for each mode are documented under the commands in the man page (choose-buffer, choose-client, choose-tree). Parts written by Thomas Adam.
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-04-21Make the cmd_find_* functions more obvious when looking for a client,nicm
rather than having it inside other functions. Should be no change to the way targets are resolved just yet.
2017-04-20If a #() command doesn't exit, use its most recent line of output (itnicm
must be a full line). Don't let it redraw the status line more than once a second. Requested by someone about 10 years ago...
2017-03-08Add a helper function for the most common format_create/defaults/expandnicm
pattern.
2017-02-16Style nits.nicm
2017-02-03Add a window or pane id "tag" to each format tree and use it to separatenicm
jobs, this means that if the same job is used for different windows or panes (for example in pane-border-format), it will be run separately for each pane.
2016-11-12Apply the right fix for run -b, used the wrong diff before.nicm
2016-11-11Do not crash with run-shell -b and no window pane available, reported bynicm
Sergei Dyshel.
2016-10-16Mass rename struct cmd_q to struct cmdq_item and related.nicm
2016-10-16Rewrite command queue handling. Each client still has a command queue,nicm
but there is also now a global command queue. Instead of command queues being dispatched on demand from wherever the command happens to be added, they are now all dispatched from the top level server loop. Command queues may now also include callbacks as well as commands, and items may be inserted after the current command as well as at the end. This all makes command queues significantly more predictable and easier to use, and avoids the complex multiple nested command queues used by source-file, if-shell and friends. A mass rename of struct cmdq to a better name (cmdq_item probably) is coming.
2016-10-15Only use pane with run-shell if -t is given.nicm
2016-10-10Add static in cmd-* and fix a few other nits.nicm
2016-10-09Pass file/line to new command for if-shell so that errors appearnicm
sensibly.
2016-02-12Expand client formats in run-shell.nicm