aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2013-08-23 15:58:46 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2013-08-23 15:58:46 +0100
commit2f7ffab0e8de524832b591a9ce6f034406f52e3d (patch)
tree2eb118467251a2b38eb48c39b13cb93678cf846b
parent3ed5e56a3974016dad9c28f42356aba9c05e0f4c (diff)
parenta0802dd4869bfefe548734a840dc2e1d3cb15c90 (diff)
downloadrtmux-2f7ffab0e8de524832b591a9ce6f034406f52e3d.tar.gz
rtmux-2f7ffab0e8de524832b591a9ce6f034406f52e3d.tar.bz2
rtmux-2f7ffab0e8de524832b591a9ce6f034406f52e3d.zip
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
-rw-r--r--TODO5
-rw-r--r--cmd-attach-session.c1
-rw-r--r--cmd-bind-key.c27
-rw-r--r--cmd-break-pane.c1
-rw-r--r--cmd-capture-pane.c1
-rw-r--r--cmd-choose-buffer.c1
-rw-r--r--cmd-choose-client.c1
-rw-r--r--cmd-choose-list.c1
-rw-r--r--cmd-choose-tree.c3
-rw-r--r--cmd-clear-history.c1
-rw-r--r--cmd-clock-mode.c1
-rw-r--r--cmd-command-prompt.c2
-rw-r--r--cmd-confirm-before.c1
-rw-r--r--cmd-copy-mode.c1
-rw-r--r--cmd-delete-buffer.c1
-rw-r--r--cmd-detach-client.c1
-rw-r--r--cmd-display-message.c7
-rw-r--r--cmd-display-panes.c1
-rw-r--r--cmd-find-window.c1
-rw-r--r--cmd-has-session.c1
-rw-r--r--cmd-if-shell.c1
-rw-r--r--cmd-join-pane.c2
-rw-r--r--cmd-kill-pane.c1
-rw-r--r--cmd-kill-server.c1
-rw-r--r--cmd-kill-session.c1
-rw-r--r--cmd-kill-window.c1
-rw-r--r--cmd-link-window.c1
-rw-r--r--cmd-list-buffers.c1
-rw-r--r--cmd-list-clients.c1
-rw-r--r--cmd-list-commands.c1
-rw-r--r--cmd-list-keys.c1
-rw-r--r--cmd-list-panes.c1
-rw-r--r--cmd-list-sessions.c1
-rw-r--r--cmd-list-windows.c1
-rw-r--r--cmd-load-buffer.c1
-rw-r--r--cmd-lock-server.c3
-rw-r--r--cmd-move-window.c1
-rw-r--r--cmd-new-session.c15
-rw-r--r--cmd-new-window.c1
-rw-r--r--cmd-paste-buffer.c1
-rw-r--r--cmd-pipe-pane.c1
-rw-r--r--cmd-refresh-client.c1
-rw-r--r--cmd-rename-session.c1
-rw-r--r--cmd-rename-window.c1
-rw-r--r--cmd-resize-pane.c1
-rw-r--r--cmd-respawn-pane.c1
-rw-r--r--cmd-respawn-window.c1
-rw-r--r--cmd-rotate-window.c1
-rw-r--r--cmd-run-shell.c1
-rw-r--r--cmd-save-buffer.c2
-rw-r--r--cmd-select-layout.c3
-rw-r--r--cmd-select-pane.c2
-rw-r--r--cmd-select-window.c4
-rw-r--r--cmd-send-keys.c2
-rw-r--r--cmd-server-info.c1
-rw-r--r--cmd-set-buffer.c1
-rw-r--r--cmd-set-environment.c1
-rw-r--r--cmd-set-option.c2
-rw-r--r--cmd-show-environment.c1
-rw-r--r--cmd-show-messages.c1
-rw-r--r--cmd-show-options.c2
-rw-r--r--cmd-source-file.c1
-rw-r--r--cmd-split-window.c1
-rw-r--r--cmd-start-server.c1
-rw-r--r--cmd-suspend-client.c1
-rw-r--r--cmd-swap-pane.c1
-rw-r--r--cmd-swap-window.c1
-rw-r--r--cmd-switch-client.c1
-rw-r--r--cmd-unbind-key.c24
-rw-r--r--cmd-unlink-window.c1
-rw-r--r--cmd-wait-for.c1
-rw-r--r--cmd.c2
-rw-r--r--grid.c7
-rw-r--r--tmux.17
-rw-r--r--tmux.h2
-rw-r--r--window.c1
76 files changed, 44 insertions, 135 deletions
diff --git a/TODO b/TODO
index e72e83a2..f4cf7b6d 100644
--- a/TODO
+++ b/TODO
@@ -18,6 +18,8 @@
- options bits and pieces:
* set-remain-on-exit is a complete hack
* way to set socket path from config file
+ * -fg/-bg/-attr is crap - better just foo-style options which accept
+ fg=,bg=,bright and so on like #[]
- format improvements:
* option to quote format (#{session_name:quoted})
@@ -30,6 +32,7 @@
* choose-mode and copy-mode are very similar, make choose-mode a subset?
* flag to choose-* for sort order
* choose mode would be better per client than per window
+ * two choices (first one then second, for swap-pane and join-pane)
- improve monitor-*:
* straighten out rules for multiple clients
@@ -91,8 +94,6 @@
- mouse-select-pane will screw up with !MODE_MOUSE_STANDARD (it sets the flag
on w/o checking the others before calling tty_update_mode)
-- panes should have names like windows
-
- way to tag a layout as a number/name
- optimize pane redraws, 20120318184853.GK10965@yelena.nicm.ath.cx
diff --git a/cmd-attach-session.c b/cmd-attach-session.c
index 07185737..cf5f30a4 100644
--- a/cmd-attach-session.c
+++ b/cmd-attach-session.c
@@ -34,7 +34,6 @@ const struct cmd_entry cmd_attach_session_entry = {
"[-dr] " CMD_TARGET_SESSION_USAGE,
CMD_CANTNEST|CMD_STARTSERVER|CMD_SENDENVIRON,
NULL,
- NULL,
cmd_attach_session_exec
};
diff --git a/cmd-bind-key.c b/cmd-bind-key.c
index 71e79ea0..4ff3ac84 100644
--- a/cmd-bind-key.c
+++ b/cmd-bind-key.c
@@ -27,7 +27,6 @@
* Bind a key to a command, this recurses through cmd_*.
*/
-enum cmd_retval cmd_bind_key_check(struct args *);
enum cmd_retval cmd_bind_key_exec(struct cmd *, struct cmd_q *);
enum cmd_retval cmd_bind_key_table(struct cmd *, struct cmd_q *, int);
@@ -38,24 +37,10 @@ const struct cmd_entry cmd_bind_key_entry = {
"[-cnr] [-t key-table] key command [arguments]",
0,
NULL,
- cmd_bind_key_check,
cmd_bind_key_exec
};
enum cmd_retval
-cmd_bind_key_check(struct args *args)
-{
- if (args_has(args, 't')) {
- if (args->argc != 2 && args->argc != 3)
- return (CMD_RETURN_ERROR);
- } else {
- if (args->argc < 2)
- return (CMD_RETURN_ERROR);
- }
- return (CMD_RETURN_NORMAL);
-}
-
-enum cmd_retval
cmd_bind_key_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -63,6 +48,18 @@ cmd_bind_key_exec(struct cmd *self, struct cmd_q *cmdq)
struct cmd_list *cmdlist;
int key;
+ if (args_has(args, 't')) {
+ if (args->argc != 2 && args->argc != 3) {
+ cmdq_error(cmdq, "not enough arguments");
+ return (CMD_RETURN_ERROR);
+ }
+ } else {
+ if (args->argc < 2) {
+ cmdq_error(cmdq, "not enough arguments");
+ return (CMD_RETURN_ERROR);
+ }
+ }
+
key = key_string_lookup_string(args->argv[0]);
if (key == KEYC_NONE) {
cmdq_error(cmdq, "unknown key: %s", args->argv[0]);
diff --git a/cmd-break-pane.c b/cmd-break-pane.c
index 8ed9a1a6..d0a5a450 100644
--- a/cmd-break-pane.c
+++ b/cmd-break-pane.c
@@ -34,7 +34,6 @@ const struct cmd_entry cmd_break_pane_entry = {
"[-dP] [-F format] " CMD_TARGET_PANE_USAGE,
0,
NULL,
- NULL,
cmd_break_pane_exec
};
diff --git a/cmd-capture-pane.c b/cmd-capture-pane.c
index f59dc2d6..e157e3cb 100644
--- a/cmd-capture-pane.c
+++ b/cmd-capture-pane.c
@@ -42,7 +42,6 @@ const struct cmd_entry cmd_capture_pane_entry = {
CMD_TARGET_PANE_USAGE,
0,
NULL,
- NULL,
cmd_capture_pane_exec
};
diff --git a/cmd-choose-buffer.c b/cmd-choose-buffer.c
index e6b79d91..d79f6fdc 100644
--- a/cmd-choose-buffer.c
+++ b/cmd-choose-buffer.c
@@ -35,7 +35,6 @@ const struct cmd_entry cmd_choose_buffer_entry = {
CMD_TARGET_WINDOW_USAGE " [-F format] [template]",
0,
NULL,
- NULL,
cmd_choose_buffer_exec
};
diff --git a/cmd-choose-client.c b/cmd-choose-client.c
index 40752a70..93671987 100644
--- a/cmd-choose-client.c
+++ b/cmd-choose-client.c
@@ -37,7 +37,6 @@ const struct cmd_entry cmd_choose_client_entry = {
CMD_TARGET_WINDOW_USAGE " [-F format] [template]",
0,
NULL,
- NULL,
cmd_choose_client_exec
};
diff --git a/cmd-choose-list.c b/cmd-choose-list.c
index 15f87294..c3caabba 100644
--- a/cmd-choose-list.c
+++ b/cmd-choose-list.c
@@ -39,7 +39,6 @@ const struct cmd_entry cmd_choose_list_entry = {
"[-l items] " CMD_TARGET_WINDOW_USAGE "[template]",
0,
NULL,
- NULL,
cmd_choose_list_exec
};
diff --git a/cmd-choose-tree.c b/cmd-choose-tree.c
index 2fe6e171..be3bd69a 100644
--- a/cmd-choose-tree.c
+++ b/cmd-choose-tree.c
@@ -41,7 +41,6 @@ const struct cmd_entry cmd_choose_tree_entry = {
"[-W format] " CMD_TARGET_WINDOW_USAGE,
0,
NULL,
- NULL,
cmd_choose_tree_exec
};
@@ -51,7 +50,6 @@ const struct cmd_entry cmd_choose_session_entry = {
CMD_TARGET_WINDOW_USAGE " [-F format] [template]",
0,
NULL,
- NULL,
cmd_choose_tree_exec
};
@@ -61,7 +59,6 @@ const struct cmd_entry cmd_choose_window_entry = {
CMD_TARGET_WINDOW_USAGE "[-F format] [template]",
0,
NULL,
- NULL,
cmd_choose_tree_exec
};
diff --git a/cmd-clear-history.c b/cmd-clear-history.c
index aebaa27d..cce3ea18 100644
--- a/cmd-clear-history.c
+++ b/cmd-clear-history.c
@@ -32,7 +32,6 @@ const struct cmd_entry cmd_clear_history_entry = {
CMD_TARGET_PANE_USAGE,
0,
NULL,
- NULL,
cmd_clear_history_exec
};
diff --git a/cmd-clock-mode.c b/cmd-clock-mode.c
index 872f3d53..50e4ab8b 100644
--- a/cmd-clock-mode.c
+++ b/cmd-clock-mode.c
@@ -32,7 +32,6 @@ const struct cmd_entry cmd_clock_mode_entry = {
CMD_TARGET_PANE_USAGE,
0,
NULL,
- NULL,
cmd_clock_mode_exec
};
diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c
index 3bb79ed9..759d578b 100644
--- a/cmd-command-prompt.c
+++ b/cmd-command-prompt.c
@@ -30,7 +30,6 @@
*/
void cmd_command_prompt_key_binding(struct cmd *, int);
-int cmd_command_prompt_check(struct args *);
enum cmd_retval cmd_command_prompt_exec(struct cmd *, struct cmd_q *);
int cmd_command_prompt_callback(void *, const char *);
@@ -42,7 +41,6 @@ const struct cmd_entry cmd_command_prompt_entry = {
"[-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE " [template]",
0,
cmd_command_prompt_key_binding,
- NULL,
cmd_command_prompt_exec
};
diff --git a/cmd-confirm-before.c b/cmd-confirm-before.c
index e670f69c..9266721f 100644
--- a/cmd-confirm-before.c
+++ b/cmd-confirm-before.c
@@ -38,7 +38,6 @@ const struct cmd_entry cmd_confirm_before_entry = {
"[-p prompt] " CMD_TARGET_CLIENT_USAGE " command",
0,
cmd_confirm_before_key_binding,
- NULL,
cmd_confirm_before_exec
};
diff --git a/cmd-copy-mode.c b/cmd-copy-mode.c
index 40584a28..f11c7aff 100644
--- a/cmd-copy-mode.c
+++ b/cmd-copy-mode.c
@@ -33,7 +33,6 @@ const struct cmd_entry cmd_copy_mode_entry = {
"[-u] " CMD_TARGET_PANE_USAGE,
0,
cmd_copy_mode_key_binding,
- NULL,
cmd_copy_mode_exec
};
diff --git a/cmd-delete-buffer.c b/cmd-delete-buffer.c
index bc3982ca..b8f55db4 100644
--- a/cmd-delete-buffer.c
+++ b/cmd-delete-buffer.c
@@ -34,7 +34,6 @@ const struct cmd_entry cmd_delete_buffer_entry = {
CMD_BUFFER_USAGE,
0,
NULL,
- NULL,
cmd_delete_buffer_exec
};
diff --git a/cmd-detach-client.c b/cmd-detach-client.c
index 6e00e079..ea9e3816 100644
--- a/cmd-detach-client.c
+++ b/cmd-detach-client.c
@@ -32,7 +32,6 @@ const struct cmd_entry cmd_detach_client_entry = {
"[-P] [-a] [-s target-session] " CMD_TARGET_CLIENT_USAGE,
CMD_READONLY,
NULL,
- NULL,
cmd_detach_client_exec
};
diff --git a/cmd-display-message.c b/cmd-display-message.c
index 485ccf08..78752f86 100644
--- a/cmd-display-message.c
+++ b/cmd-display-message.c
@@ -36,7 +36,6 @@ const struct cmd_entry cmd_display_message_entry = {
" [message]",
0,
NULL,
- NULL,
cmd_display_message_exec
};
@@ -71,9 +70,9 @@ cmd_display_message_exec(struct cmd *self, struct cmd_q *cmdq)
}
if (args_has(args, 'c')) {
- c = cmd_find_client(cmdq, args_get(args, 'c'), 0);
- if (c == NULL)
- return (CMD_RETURN_ERROR);
+ c = cmd_find_client(cmdq, args_get(args, 'c'), 0);
+ if (c == NULL)
+ return (CMD_RETURN_ERROR);
} else {
c = cmd_current_client(cmdq);
if (c == NULL && !args_has(self->args, 'p')) {
diff --git a/cmd-display-panes.c b/cmd-display-panes.c
index 4a8731a4..c137feef 100644
--- a/cmd-display-panes.c
+++ b/cmd-display-panes.c
@@ -32,7 +32,6 @@ const struct cmd_entry cmd_display_panes_entry = {
CMD_TARGET_CLIENT_USAGE,
0,
NULL,
- NULL,
cmd_display_panes_exec
};
diff --git a/cmd-find-window.c b/cmd-find-window.c
index 02f19307..647cc8fb 100644
--- a/cmd-find-window.c
+++ b/cmd-find-window.c
@@ -48,7 +48,6 @@ const struct cmd_entry cmd_find_window_entry = {
"[-CNT] [-F format] " CMD_TARGET_WINDOW_USAGE " match-string",
0,
NULL,
- NULL,
cmd_find_window_exec
};
diff --git a/cmd-has-session.c b/cmd-has-session.c
index c4286b86..38a92f61 100644
--- a/cmd-has-session.c
+++ b/cmd-has-session.c
@@ -32,7 +32,6 @@ const struct cmd_entry cmd_has_session_entry = {
CMD_TARGET_SESSION_USAGE,
0,
NULL,
- NULL,
cmd_has_session_exec
};
diff --git a/cmd-if-shell.c b/cmd-if-shell.c
index d1cbd7f3..a074341b 100644
--- a/cmd-if-shell.c
+++ b/cmd-if-shell.c
@@ -41,7 +41,6 @@ const struct cmd_entry cmd_if_shell_entry = {
"[-b] " CMD_TARGET_PANE_USAGE " shell-command command [command]",
0,
NULL,
- NULL,
cmd_if_shell_exec
};
diff --git a/cmd-join-pane.c b/cmd-join-pane.c
index 2cf587e0..1a710cec 100644
--- a/cmd-join-pane.c
+++ b/cmd-join-pane.c
@@ -39,7 +39,6 @@ const struct cmd_entry cmd_join_pane_entry = {
"[-bdhv] [-p percentage|-l size] [-s src-pane] [-t dst-pane]",
0,
cmd_join_pane_key_binding,
- NULL,
cmd_join_pane_exec
};
@@ -49,7 +48,6 @@ const struct cmd_entry cmd_move_pane_entry = {
"[-bdhv] [-p percentage|-l size] [-s src-pane] [-t dst-pane]",
0,
NULL,
- NULL,
cmd_join_pane_exec
};
diff --git a/cmd-kill-pane.c b/cmd-kill-pane.c
index 40761350..bf486eb3 100644
--- a/cmd-kill-pane.c
+++ b/cmd-kill-pane.c
@@ -34,7 +34,6 @@ const struct cmd_entry cmd_kill_pane_entry = {
"[-a] " CMD_TARGET_PANE_USAGE,
0,
NULL,
- NULL,
cmd_kill_pane_exec
};
diff --git a/cmd-kill-server.c b/cmd-kill-server.c
index a6065460..ba63faa3 100644
--- a/cmd-kill-server.c
+++ b/cmd-kill-server.c
@@ -35,7 +35,6 @@ const struct cmd_entry cmd_kill_server_entry = {
"",
0,
NULL,
- NULL,
cmd_kill_server_exec
};
diff --git a/cmd-kill-session.c b/cmd-kill-session.c
index a12cc8a4..54b0c31b 100644
--- a/cmd-kill-session.c
+++ b/cmd-kill-session.c
@@ -35,7 +35,6 @@ const struct cmd_entry cmd_kill_session_entry = {
"[-a] " CMD_TARGET_SESSION_USAGE,
0,
NULL,
- NULL,
cmd_kill_session_exec
};
diff --git a/cmd-kill-window.c b/cmd-kill-window.c
index 34b97499..ca8fe3d6 100644
--- a/cmd-kill-window.c
+++ b/cmd-kill-window.c
@@ -32,7 +32,6 @@ const struct cmd_entry cmd_kill_window_entry = {
"[-a] " CMD_TARGET_WINDOW_USAGE,
0,
NULL,
- NULL,
cmd_kill_window_exec
};
diff --git a/cmd-link-window.c b/cmd-link-window.c
index 2be8ace0..d94eb38a 100644
--- a/cmd-link-window.c
+++ b/cmd-link-window.c
@@ -34,7 +34,6 @@ const struct cmd_entry cmd_link_window_entry = {
"[-dk] " CMD_SRCDST_WINDOW_USAGE,
0,
NULL,
- NULL,
cmd_link_window_exec
};
diff --git a/cmd-list-buffers.c b/cmd-list-buffers.c
index 58af0020..02a4183e 100644
--- a/cmd-list-buffers.c
+++ b/cmd-list-buffers.c
@@ -35,7 +35,6 @@ const struct cmd_entry cmd_list_buffers_entry = {
"[-F format]",
0,
NULL,
- NULL,
cmd_list_buffers_exec
};
diff --git a/cmd-list-clients.c b/cmd-list-clients.c
index 59f63099..904ec005 100644
--- a/cmd-list-clients.c
+++ b/cmd-list-clients.c
@@ -36,7 +36,6 @@ const struct cmd_entry cmd_list_clients_entry = {
"[-F format] " CMD_TARGET_SESSION_USAGE,
CMD_READONLY,
NULL,
- NULL,
cmd_list_clients_exec
};
diff --git a/cmd-list-commands.c b/cmd-list-commands.c
index 1bf6e703..06e48378 100644
--- a/cmd-list-commands.c
+++ b/cmd-list-commands.c
@@ -32,7 +32,6 @@ const struct cmd_entry cmd_list_commands_entry = {
"",
0,
NULL,
- NULL,
cmd_list_commands_exec
};
diff --git a/cmd-list-keys.c b/cmd-list-keys.c
index 78998b66..615c5ce1 100644
--- a/cmd-list-keys.c
+++ b/cmd-list-keys.c
@@ -35,7 +35,6 @@ const struct cmd_entry cmd_list_keys_entry = {
"[-t key-table]",
0,
NULL,
- NULL,
cmd_list_keys_exec
};
diff --git a/cmd-list-panes.c b/cmd-list-panes.c
index 0d498e28..c989eba1 100644
--- a/cmd-list-panes.c
+++ b/cmd-list-panes.c
@@ -41,7 +41,6 @@ const struct cmd_entry cmd_list_panes_entry = {
"[-as] [-F format] " CMD_TARGET_WINDOW_USAGE,
0,
NULL,
- NULL,
cmd_list_panes_exec
};
diff --git a/cmd-list-sessions.c b/cmd-list-sessions.c
index 61c12f4e..a3613c87 100644
--- a/cmd-list-sessions.c
+++ b/cmd-list-sessions.c
@@ -36,7 +36,6 @@ const struct cmd_entry cmd_list_sessions_entry = {
"[-F format]",
0,
NULL,
- NULL,
cmd_list_sessions_exec
};
diff --git a/cmd-list-windows.c b/cmd-list-windows.c
index 5c2a2b95..ce122f45 100644
--- a/cmd-list-windows.c
+++ b/cmd-list-windows.c
@@ -39,7 +39,6 @@ const struct cmd_entry cmd_list_windows_entry = {
"[-a] [-F format] " CMD_TARGET_SESSION_USAGE,
0,
NULL,
- NULL,
cmd_list_windows_exec
};
diff --git a/cmd-load-buffer.c b/cmd-load-buffer.c
index 3be14d6a..82b8f574 100644
--- a/cmd-load-buffer.c
+++ b/cmd-load-buffer.c
@@ -39,7 +39,6 @@ const struct cmd_entry cmd_load_buffer_