summaryrefslogtreecommitdiffstats
path: root/cmd-list-clients.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-01-04 00:42:46 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-01-04 00:42:46 +0000
commit7502cb3adbb26a2f94445a35626e64041d6769f9 (patch)
tree6ae4f33f69dc0a470dbe905b5140216fb19b8f01 /cmd-list-clients.c
parentac3b78a84178a308536a56ea114b0f6f8ce6fb47 (diff)
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.
Diffstat (limited to 'cmd-list-clients.c')
-rw-r--r--cmd-list-clients.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/cmd-list-clients.c b/cmd-list-clients.c
index 9c941b45..026f12a7 100644
--- a/cmd-list-clients.c
+++ b/cmd-list-clients.c
@@ -31,13 +31,12 @@ int cmd_list_clients_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_list_clients_entry = {
"list-clients", "lsc",
+ "", 0, 0,
"",
- 0, "",
+ 0,
NULL,
NULL,
- cmd_list_clients_exec,
- NULL,
- NULL
+ cmd_list_clients_exec
};
/* ARGSUSED */