Go to file
Nicholas Marriott 20636d956d Add a command queue to standardize and simplify commands that call other
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-24 09:54:10 +00:00
Makefile Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
arguments.c xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
array.h xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
attributes.c Use snprintf for constructing attribute string, from Tim Ruehsen. 2012-03-17 21:45:25 +00:00
cfg.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
client.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
clock.c Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last 2009-12-03 22:50:09 +00:00
cmd-attach-session.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-bind-key.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-break-pane.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-capture-pane.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-choose-buffer.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-choose-client.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-choose-list.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-choose-tree.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-clear-history.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-clock-mode.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-command-prompt.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-confirm-before.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-copy-mode.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-delete-buffer.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-detach-client.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-display-message.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-display-panes.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-find-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-has-session.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-if-shell.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-join-pane.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-kill-pane.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-kill-server.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-kill-session.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-kill-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-link-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-list-buffers.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-list-clients.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-list-commands.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-list-keys.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-list-panes.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-list-sessions.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-list-windows.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-list.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-load-buffer.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-lock-server.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-move-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-new-session.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-new-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-paste-buffer.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-pipe-pane.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-queue.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-refresh-client.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-rename-session.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-rename-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-resize-pane.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-respawn-pane.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-respawn-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-rotate-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-run-shell.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-save-buffer.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-select-layout.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-select-pane.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-select-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-send-keys.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-send-prefix.c Make command exec functions return an enum rather than -1/0/1 values and 2012-07-11 07:10:15 +00:00
cmd-server-info.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-set-buffer.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-set-environment.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-set-option.c Add user options, prefixed with @. May be set to any arbitrary string. 2013-03-21 16:17:01 +00:00
cmd-show-buffer.c Make command exec functions return an enum rather than -1/0/1 values and 2012-07-11 07:10:15 +00:00
cmd-show-environment.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-show-messages.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-show-options.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-source-file.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-split-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-start-server.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-string.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-suspend-client.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-swap-pane.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-swap-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-switch-client.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-unbind-key.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd-unlink-window.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
cmd.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
colour.c Add strings to allow the aixterm bright colours to be used when 2012-01-21 08:23:12 +00:00
control-notify.c Add notification for input from a pane, from George Nachman. 2012-09-25 07:41:22 +00:00
control.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
environ.c xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
format.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
grid-cell.c Rather than having two grids for each pane, one for ASCII and one for 2013-01-18 02:16:21 +00:00
grid-view.c Add -C and -J to capture pane to escape control sequences and to join 2013-03-22 15:56:11 +00:00
grid.c Add -C and -J to capture pane to escape control sequences and to join 2013-03-22 15:56:11 +00:00
input-keys.c Support the latest theory for mouse input, this is enabled/disabled with 2013-03-22 10:33:50 +00:00
input.c Add support for focus notifications when tmux pane changes, based on 2013-03-24 09:18:16 +00:00
job.c No more lint means no more ARGSUSED. 2013-03-22 10:31:22 +00:00
key-bindings.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
key-string.c In terminals with XT, turn on modifyOtherKeys=1 with the escape sequence 2013-03-22 10:30:04 +00:00
layout-custom.c Add notify hooks for various events, the functions are currently empty 2012-03-17 22:35:09 +00:00
layout-set.c Fix a trivial copy-and-paste error (sx->sy), from Chris Johnsen. 2011-11-09 12:02:07 +00:00
layout.c Add resize-pane -x and -y for absolute pane size (much requested). 2013-03-22 10:37:39 +00:00
log.c Do not use stderr for log file and don't call log_close when not needed. 2012-05-30 15:01:21 +00:00
mode-key.c Add copy-pipe mode command to copy selection and also pipe to a command. 2013-03-22 15:52:40 +00:00
names.c Add option command-prefix which is automatically prepended to any 2013-03-24 09:21:27 +00:00
notify.c Add notification for input from a pane, from George Nachman. 2012-09-25 07:41:22 +00:00
options-table.c Add option command-prefix which is automatically prepended to any 2013-03-24 09:21:27 +00:00
options.c xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
paste.c Support middle-click paste, based on a diff from Ailin Nemui. 2012-11-27 20:22:12 +00:00
procname.c We no longer use struct eproc for kinfo_proc in sysctl.h so there 2012-12-18 21:28:45 +00:00
resize.c Do not include status line in size calculations in control mode. 2013-03-21 18:46:12 +00:00
screen-redraw.c Use a predefined structure for not-space cells used to set attributes. 2012-05-23 19:19:40 +00:00
screen-write.c Unbreak line wrapping. 2013-03-22 10:41:01 +00:00
screen.c Rework reflow code so it does not do so much allocation which should be 2013-03-21 16:12:10 +00:00
server-client.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
server-fn.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
server-window.c Add various checks to turn off bits that can't work in control mode 2013-03-21 18:47:01 +00:00
server.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
session.c Add session_set_current helper function, extracted from a diff from 2013-03-22 16:00:26 +00:00
signal.c Do not call event_del() for signals after fork(), just use sigaction() 2010-08-19 18:29:01 +00:00
status.c evbuffer_readline returns allocated storage, don't leak it. 2013-03-22 15:55:22 +00:00
tmux.1 Expand format variables in the run-shell and if-shell shell commands, 2013-03-24 09:33:35 +00:00
tmux.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
tmux.h Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
tty-acs.c Use UTF-8 line drawing characters on UTF-8 terminals. Fixes some stupid 2010-09-11 16:19:22 +00:00
tty-keys.c Handle focus events from the terminal, from Aaron Jensen. 2013-03-24 09:28:59 +00:00
tty-term.c Implement ECH (erase character, CSI X). Reported by Christian Neukirchen. 2013-01-15 23:18:55 +00:00
tty.c Handle focus events from the terminal, from Aaron Jensen. 2013-03-24 09:28:59 +00:00
utf8.c Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262 2011-01-03 23:35:21 +00:00
window-choose.c Add a command queue to standardize and simplify commands that call other 2013-03-24 09:54:10 +00:00
window-clock.c No more lint means no more ARGSUSED. 2013-03-22 10:31:22 +00:00
window-copy.c Add copy-pipe mode command to copy selection and also pipe to a command. 2013-03-22 15:52:40 +00:00
window.c Do pane resize ioctls once at the end of the server loop rather than 2013-03-24 09:25:04 +00:00
xmalloc.c xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
xterm-keys.c In terminals with XT, turn on modifyOtherKeys=1 with the escape sequence 2013-03-22 10:30:04 +00:00