aboutsummaryrefslogtreecommitdiff
path: root/cmd-run-shell.c
Commit message (Collapse)AuthorAge
* Fix run-shell -d with no command, GitHub issue 2885.nicm2021-09-16
|
* For the moment, restore if-shell and run-shell to parsing at the lastnicm2021-09-15
| | | | | moment (when the shell command completes) rather than when first invoked, GitHub issue 2872.
* Expand argument to run-shell again.nicm2021-09-09
|
* Validate command argument types (string or command list) and give morenicm2021-08-25
| | | | useful error messages.
* Move command argument parsing common functions and don't bother to parsenicm2021-08-23
| | | | again if given a command rather than a string.
* Add args parsing callback for some future work, currently unused.nicm2021-08-21
|
* Hide struct args behind a couple of accessor functions.nicm2021-08-20
|
* Set return code for confirm-before and make command-prompt also block,nicm2021-08-13
| | | | GitHub issue 2822.
* Add a flag to disable keys to close a message, GitHub issue 2625.nicm2021-04-12
|
* Do not crash if there is no item to show command error, from Anindyanicm2021-03-15
| | | | Mukherjee.
* Drop support for popups where the content is provided directly to tmuxnicm2021-03-02
| | | | | | (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).
* Add a -C flag to run-shell to use a tmux command rather than a shell command.nicm2021-01-01
|
* Do not wait on shutdown for commands started with run -b.nicm2020-06-12
|
* Add a customize mode where keys and options may be browsed and changed,nicm2020-05-16
| | | | | includes adding a brief description of each option. Bound to "C" by default.
* Make client -c and -t handling common in cmd-queue.c and try to benicm2020-04-13
| | | | | clearer about whether the client is the target client (must have a session) or not.
* Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make itsnicm2020-04-13
| | | | use more clearly defined and preparation for some future work).
* Make struct cmd local to cmd.c and move it out of tmux.h.nicm2020-04-13
|
* Now that copy mode copies the pane content rather than keeping anicm2020-04-10
| | | | | | | | | | 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.
* Preserve exit status from run-shell and pass to the client.nicm2020-03-21
|
* Add a flag to run a background process in a pty as well, not used fornicm2020-03-19
| | | | anything yet.
* Do not add a reference to the session if no session is present.nicm2020-03-13
|
* Add a -d flag to run-shell to wait for delay before running the command,nicm2020-03-12
| | | | also allow run-shell to accept no command to just delay.
* Add a cmdq_continue function rather than twiddling the flag directly.nicm2019-06-18
|
* Allow multiple modes to be open in a pane. A stack of open modes is keptnicm2019-03-12
| | | | | | 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.
* Make the mode used to view command output (a variant of copy mode) usenicm2019-03-08
| | | | | its own mode definition struct with a different init function rather than calling special setup functions.
* Tidy changing the mode into window_copy_init_for_output.nicm2019-03-07
|
* Memory leaks, from Gang Fan in GitHub issue 1453.nicm2018-08-27
|
* Move job struct into job.c.nicm2018-08-23
|
* Make server_client_get_cwd used (almost) everywhere we need to work outnicm2018-05-24
| | | | | the cwd, and do not fall back to "." as it is pretty useless. GitHub issue 1331.
* Add a missing client-detached hook when the server shuts down, and donicm2018-03-08
| | | | | 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.
* Pass flags into cmd_find_from_* to fix prefer-unattached, reported bynicm2017-08-30
| | | | Thomas Sattler.
* Rewrite of choose mode, both to simplify and tidy the code and to addnicm2017-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Get rid of the extra layer of flags and cmd_prepare() and just store thenicm2017-04-22
| | | | | | 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.
* Make the cmd_find_* functions more obvious when looking for a client,nicm2017-04-21
| | | | | rather than having it inside other functions. Should be no change to the way targets are resolved just yet.
* If a #() command doesn't exit, use its most recent line of output (itnicm2017-04-20
| | | | | | | 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...
* Add a helper function for the most common format_create/defaults/expandnicm2017-03-08
| | | | pattern.
* Style nits.nicm2017-02-16
|
* Add a window or pane id "tag" to each format tree and use it to separatenicm2017-02-03
| | | | | | 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.
* Apply the right fix for run -b, used the wrong diff before.nicm2016-11-12
|
* Do not crash with run-shell -b and no window pane available, reported bynicm2016-11-11
| | | | Sergei Dyshel.
* Mass rename struct cmd_q to struct cmdq_item and related.nicm2016-10-16
|
* Rewrite command queue handling. Each client still has a command queue,nicm2016-10-16
| | | | | | | | | | | | | | | 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.
* Only use pane with run-shell if -t is given.nicm2016-10-15
|
* Add static in cmd-* and fix a few other nits.nicm2016-10-10
|
* Pass file/line to new command for if-shell so that errors appearnicm2016-10-09
| | | | sensibly.
* Expand client formats in run-shell.nicm2016-02-12
|
* Instead of combined flags for -c, -s, -t, split into different setsnicm2015-12-14
| | | | using an enum and simplify the parsing code.
* Use member names in cmd_entry definitions so I stop getting confusednicm2015-12-13
| | | | about the order.
* 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.
* 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).