Go to file
Tiago Cunha 1df427bc7b Sync OpenBSD patchset 829:
Clean up and simplify tmux command argument parsing.

Originally, tmux commands were parsed in the client process into a
struct with the command data which was then serialised and sent to the
server to be executed. The parsing was later moved into the server (an
argv was sent from the client), but the parse step and intermediate
struct was kept.

This change removes that struct and the separate parse step. Argument
parsing and printing is now common to all commands (in arguments.c) with
each command left with just an optional check function (to validate the
arguments at parse time), the exec function and a function to set up any
key bindings (renamed from the old init function).

This is overall more simple and consistent.

There should be no changes to any commands behaviour or syntax although
as this touches every command please watch for any unexpected changes.
2011-01-07 14:45:34 +00:00
compat Missing HAVE_STDINT_H. 2011-01-07 00:35:13 +00:00
examples Update, from Daniel Thau. 2010-09-18 09:36:15 +00:00
tools Bump VERSION and comment FDEBUG. 2010-12-27 21:32:16 +00:00
www Make version more prominent. 2011-01-01 13:39:19 +00:00
arguments.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
array.h Sync OpenBSD patchset 714: 2010-06-06 00:27:08 +00:00
attributes.c Sync OpenBSD patchset 700: 2010-06-05 23:54:51 +00:00
autogen.sh RCS $Id$. 2010-12-31 22:13:48 +00:00
cfg.c Sync OpenBSD patchset 811: 2010-12-30 22:26:07 +00:00
CHANGES Major changes since the previous version. 2010-12-27 21:37:42 +00:00
client.c Put setproctitle back under HAVE_SETPROCTITLE. 2010-10-24 19:54:41 +00:00
clock.c Sync OpenBSD patchset 581: 2009-12-04 22:14:47 +00:00
cmd-attach-session.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-bind-key.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-break-pane.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-capture-pane.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-choose-buffer.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-choose-client.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-choose-session.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-choose-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-clear-history.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-clock-mode.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-command-prompt.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-confirm-before.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-copy-mode.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-delete-buffer.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-detach-client.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-display-message.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-display-panes.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-find-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-generic.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-has-session.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-if-shell.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-join-pane.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-kill-pane.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-kill-server.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-kill-session.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-kill-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-last-pane.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-last-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-link-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-list-buffers.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-list-clients.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-list-commands.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-list-keys.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-list-panes.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-list-sessions.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-list-windows.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-list.c |--------------------- 2010-12-06 21:48:56 +00:00
cmd-load-buffer.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-lock-client.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-lock-server.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-lock-session.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-move-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-new-session.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-new-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-next-layout.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-next-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-paste-buffer.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-pipe-pane.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-previous-layout.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-previous-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-refresh-client.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-rename-session.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-rename-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-resize-pane.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-respawn-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-rotate-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-run-shell.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-save-buffer.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-select-layout.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-select-pane.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-select-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-send-keys.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-send-prefix.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-server-info.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-set-buffer.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-set-environment.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-set-option.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-set-window-option.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-show-buffer.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-show-environment.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-show-messages.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-show-options.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-show-window-options.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-source-file.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-split-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-start-server.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-string.c Read ${X} environment variables in strings and $HOME from the global 2010-12-13 22:53:56 +00:00
cmd-suspend-client.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-swap-pane.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-swap-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-switch-client.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-unbind-key.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd-unlink-window.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
cmd.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
colour.c Sync OpenBSD patchset 322: 2009-09-11 14:13:52 +00:00
compat.h Switch tmux to use autoconf and automake. 2010-12-31 22:12:33 +00:00
configure.ac Whoops, bad copy and paste. 2011-01-04 09:48:10 +00:00
environ.c Run job commands explicitly in the global enviroment (which can be 2010-04-06 21:59:19 +00:00
FAQ "So you have screwed up your /dev/null?" From Mathias Gumz. 2010-12-15 23:31:30 +00:00
grid-utf8.c Sync OpenBSD patchset 581: 2009-12-04 22:14:47 +00:00
grid-view.c Sync OpenBSD patchset 581: 2009-12-04 22:14:47 +00:00
grid.c Merge output (more) and copy modes into one single mode (called copy). 2010-04-05 05:11:44 +00:00
input-keys.c Sync OpenBSD patchset 828: 2011-01-07 14:34:45 +00:00
input.c Sync OpenBSD patchset 828: 2011-01-07 14:34:45 +00:00
job.c Sync OpenBSD patchset 775: 2010-10-24 00:45:57 +00:00
key-bindings.c Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
key-string.c Sync OpenBSD patchset 824: 2011-01-03 23:32:04 +00:00
layout-custom.c Sync OpenBSD patchset 732: 2010-07-02 02:54:52 +00:00
layout-set.c Sync OpenBSD patchset 799: 2010-12-22 15:23:59 +00:00
layout-string.c Sync OpenBSD patchset 732: 2010-07-02 02:54:52 +00:00
layout.c Sync OpenBSD patchset 732: 2010-07-02 02:54:52 +00:00
log.c Sync OpenBSD patchset 581: 2009-12-04 22:14:47 +00:00
Makefile.am Support --enable-static. 2011-01-04 09:43:14 +00:00
mode-key.c Sync OpenBSD patchset 823: 2011-01-03 23:31:26 +00:00
names.c Sync OpenBSD patchset 581: 2009-12-04 22:14:47 +00:00
NOTES libevent-2 works now as well. 2011-01-03 23:58:10 +00:00
options-table.c Sync OpenBSD patchset 828: 2011-01-07 14:34:45 +00:00
options.c Sync OpenBSD patchset 343: 2009-09-22 14:22:21 +00:00
osdep-darwin.c epoll on Linux is broken with /dev/null so it needs to be disabled. 2010-12-30 20:41:08 +00:00
osdep-freebsd.c epoll on Linux is broken with /dev/null so it needs to be disabled. 2010-12-30 20:41:08 +00:00
osdep-linux.c epoll on Linux is broken with /dev/null so it needs to be disabled. 2010-12-30 20:41:08 +00:00
osdep-netbsd.c epoll on Linux is broken with /dev/null so it needs to be disabled. 2010-12-30 20:41:08 +00:00
osdep-openbsd.c Stray blank line. 2010-12-30 20:42:39 +00:00
osdep-sunos.c epoll on Linux is broken with /dev/null so it needs to be disabled. 2010-12-30 20:41:08 +00:00
osdep-unknown.c epoll on Linux is broken with /dev/null so it needs to be disabled. 2010-12-30 20:41:08 +00:00
paste.c Global paste buffers instead of per-session which renders copy-buffer useless. 2010-12-30 22:39:49 +00:00
resize.c Sync OpenBSD patchset 806: 2010-12-22 15:36:44 +00:00
screen-redraw.c Sync OpenBSD patchset 762: 2010-09-18 15:43:53 +00:00
screen-write.c Sync OpenBSD patchset 828: 2011-01-07 14:34:45 +00:00
screen.c Fix rectangle copy to behave like emacs - the cursor is not part of the 2010-12-11 17:57:28 +00:00
server-client.c Sync OpenBSD patchset 828: 2011-01-07 14:34:45 +00:00
server-fn.c Sync OpenBSD patchset 819: 2011-01-03 23:27:54 +00:00
server-window.c Sync OpenBSD patchset 806: 2010-12-22 15:36:44 +00:00
server.c Sync OpenBSD patchset 819: 2011-01-03 23:27:54 +00:00
session.c Sync OpenBSD patchset 819: 2011-01-03 23:27:54 +00:00
signal.c Sync OpenBSD patchset 751: 2010-08-29 14:42:11 +00:00
status.c Sync OpenBSD patchset 827: 2011-01-07 14:32:26 +00:00
tmux.1 Sync OpenBSD patchset 828: 2011-01-07 14:34:45 +00:00
tmux.c Sync OpenBSD patchset 828: 2011-01-07 14:34:45 +00:00
tmux.h Sync OpenBSD patchset 829: 2011-01-07 14:45:34 +00:00
TODO Add. 2011-01-01 05:09:11 +00:00
tty-acs.c Sync OpenBSD patchset 762: 2010-09-18 15:43:53 +00:00
tty-keys.c Sync OpenBSD patchset 828: 2011-01-07 14:34:45 +00:00
tty-term.c Sync OpenBSD patchset 822: 2011-01-03 23:30:43 +00:00
tty.c Sync OpenBSD patchset 828: 2011-01-07 14:34:45 +00:00
utf8.c Sync OpenBSD patchset 828: 2011-01-07 14:34:45 +00:00
window-choose.c Sync OpenBSD patchset 812: 2010-12-30 22:27:38 +00:00
window-clock.c Pass in the session, rather than the client, to window modes' key() function. 2010-05-22 21:56:04 +00:00
window-copy.c Global paste buffers instead of per-session which renders copy-buffer useless. 2010-12-30 22:39:49 +00:00
window.c Add an option to alert (monitor) for silence (lack of activity) in a 2010-12-06 22:52:21 +00:00
xmalloc.c Solaris 9 has no stdint.h, ugh. Reported by a couple of people most 2010-09-07 19:32:58 +00:00
xterm-keys.c Sync OpenBSD patchset 824: 2011-01-03 23:32:04 +00:00