Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code

pull/1/head
Nicholas Marriott 2013-08-23 15:58:46 +01:00
commit 2f7ffab0e8
76 changed files with 44 additions and 135 deletions

5
TODO
View File

@ -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

View File

@ -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
};

View File

@ -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,23 +37,9 @@ 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)
{
@ -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]);

View File

@ -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
};

View File

@ -42,7 +42,6 @@ const struct cmd_entry cmd_capture_pane_entry = {
CMD_TARGET_PANE_USAGE,
0,
NULL,
NULL,
cmd_capture_pane_exec
};

View File

@ -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
};

View File

@ -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
};

View File

@ -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
};

View File

@ -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
};

View File

@ -32,7 +32,6 @@ const struct cmd_entry cmd_clear_history_entry = {
CMD_TARGET_PANE_USAGE,
0,
NULL,
NULL,
cmd_clear_history_exec
};

View File

@ -32,7 +32,6 @@ const struct cmd_entry cmd_clock_mode_entry = {
CMD_TARGET_PANE_USAGE,
0,
NULL,
NULL,
cmd_clock_mode_exec
};

View File

@ -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
};

View File

@ -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
};

View File

@ -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
};

View File

@ -34,7 +34,6 @@ const struct cmd_entry cmd_delete_buffer_entry = {
CMD_BUFFER_USAGE,
0,
NULL,
NULL,
cmd_delete_buffer_exec
};

View File

@ -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
};

View File

@ -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')) {

View File

@ -32,7 +32,6 @@ const struct cmd_entry cmd_display_panes_entry = {
CMD_TARGET_CLIENT_USAGE,
0,
NULL,
NULL,
cmd_display_panes_exec
};

View File

@ -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
};

View File

@ -32,7 +32,6 @@ const struct cmd_entry cmd_has_session_entry = {
CMD_TARGET_SESSION_USAGE,
0,
NULL,
NULL,
cmd_has_session_exec
};

View File

@ -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
};

View File

@ -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
};

View File

@ -34,7 +34,6 @@ const struct cmd_entry cmd_kill_pane_entry = {
"[-a] " CMD_TARGET_PANE_USAGE,
0,
NULL,
NULL,
cmd_kill_pane_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_kill_server_entry = {
"",
0,
NULL,
NULL,
cmd_kill_server_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_kill_session_entry = {
"[-a] " CMD_TARGET_SESSION_USAGE,
0,
NULL,
NULL,
cmd_kill_session_exec
};

View File

@ -32,7 +32,6 @@ const struct cmd_entry cmd_kill_window_entry = {
"[-a] " CMD_TARGET_WINDOW_USAGE,
0,
NULL,
NULL,
cmd_kill_window_exec
};

View File

@ -34,7 +34,6 @@ const struct cmd_entry cmd_link_window_entry = {
"[-dk] " CMD_SRCDST_WINDOW_USAGE,
0,
NULL,
NULL,
cmd_link_window_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_list_buffers_entry = {
"[-F format]",
0,
NULL,
NULL,
cmd_list_buffers_exec
};

View File

@ -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
};

View File

@ -32,7 +32,6 @@ const struct cmd_entry cmd_list_commands_entry = {
"",
0,
NULL,
NULL,
cmd_list_commands_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_list_keys_entry = {
"[-t key-table]",
0,
NULL,
NULL,
cmd_list_keys_exec
};

View File

@ -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
};

View File

@ -36,7 +36,6 @@ const struct cmd_entry cmd_list_sessions_entry = {
"[-F format]",
0,
NULL,
NULL,
cmd_list_sessions_exec
};

View File

@ -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
};

View File

@ -39,7 +39,6 @@ const struct cmd_entry cmd_load_buffer_entry = {
CMD_BUFFER_USAGE " path",
0,
NULL,
NULL,
cmd_load_buffer_exec
};

View File

@ -36,7 +36,6 @@ const struct cmd_entry cmd_lock_server_entry = {
"",
0,
NULL,
NULL,
cmd_lock_server_exec
};
@ -46,7 +45,6 @@ const struct cmd_entry cmd_lock_session_entry = {
CMD_TARGET_SESSION_USAGE,
0,
NULL,
NULL,
cmd_lock_server_exec
};
@ -56,7 +54,6 @@ const struct cmd_entry cmd_lock_client_entry = {
CMD_TARGET_CLIENT_USAGE,
0,
NULL,
NULL,
cmd_lock_server_exec
};

View File

@ -34,7 +34,6 @@ const struct cmd_entry cmd_move_window_entry = {
"[-dkr] " CMD_SRCDST_WINDOW_USAGE,
0,
NULL,
NULL,
cmd_move_window_exec
};

View File

@ -30,7 +30,6 @@
* Create a new session and attach to the current terminal unless -d is given.
*/
enum cmd_retval cmd_new_session_check(struct args *);
enum cmd_retval cmd_new_session_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_new_session_entry = {
@ -40,18 +39,9 @@ const struct cmd_entry cmd_new_session_entry = {
CMD_TARGET_SESSION_USAGE " [-x width] [-y height] [command]",
CMD_STARTSERVER|CMD_CANTNEST|CMD_SENDENVIRON,
NULL,
cmd_new_session_check,
cmd_new_session_exec
};
enum cmd_retval
cmd_new_session_check(struct args *args)
{
if (args_has(args, 't') && (args->argc != 0 || args_has(args, 'n')))
return (CMD_RETURN_ERROR);
return (CMD_RETURN_NORMAL);
}
enum cmd_retval
cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
{
@ -70,6 +60,11 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
int already_attached;
struct format_tree *ft;
if (args_has(args, 't') && (args->argc != 0 || args_has(args, 'n'))) {
cmdq_error(cmdq, "command or window name given with target");
return (CMD_RETURN_ERROR);
}
newname = args_get(args, 's');
if (newname != NULL) {
if (!session_check_name(newname)) {

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_new_window_entry = {
CMD_TARGET_WINDOW_USAGE " [command]",
0,
NULL,
NULL,
cmd_new_window_exec
};

View File

@ -38,7 +38,6 @@ const struct cmd_entry cmd_paste_buffer_entry = {
"[-dpr] [-s separator] [-b buffer-index] " CMD_TARGET_PANE_USAGE,
0,
NULL,
NULL,
cmd_paste_buffer_exec
};

View File

@ -41,7 +41,6 @@ const struct cmd_entry cmd_pipe_pane_entry = {
"[-o] " CMD_TARGET_PANE_USAGE " [command]",
0,
NULL,
NULL,
cmd_pipe_pane_exec
};

View File

@ -32,7 +32,6 @@ const struct cmd_entry cmd_refresh_client_entry = {
"[-S] [-C size] " CMD_TARGET_CLIENT_USAGE,
0,
NULL,
NULL,
cmd_refresh_client_exec
};

View File

@ -34,7 +34,6 @@ const struct cmd_entry cmd_rename_session_entry = {
CMD_TARGET_SESSION_USAGE " new-name",
0,
NULL,
NULL,
cmd_rename_session_exec
};

View File

@ -34,7 +34,6 @@ const struct cmd_entry cmd_rename_window_entry = {
CMD_TARGET_WINDOW_USAGE " new-name",
0,
NULL,
NULL,
cmd_rename_window_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_resize_pane_entry = {
"[-DLRUZ] [-x width] [-y height] " CMD_TARGET_PANE_USAGE " [adjustment]",
0,
cmd_resize_pane_key_binding,
NULL,
cmd_resize_pane_exec
};

View File

@ -36,7 +36,6 @@ const struct cmd_entry cmd_respawn_pane_entry = {
"[-k] " CMD_TARGET_PANE_USAGE " [command]",
0,
NULL,
NULL,
cmd_respawn_pane_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_respawn_window_entry = {
"[-k] " CMD_TARGET_WINDOW_USAGE " [command]",
0,
NULL,
NULL,
cmd_respawn_window_exec
};

View File

@ -33,7 +33,6 @@ const struct cmd_entry cmd_rotate_window_entry = {
"[-DU] " CMD_TARGET_WINDOW_USAGE,
0,
cmd_rotate_window_key_binding,
NULL,
cmd_rotate_window_exec
};

View File

@ -41,7 +41,6 @@ const struct cmd_entry cmd_run_shell_entry = {
"[-b] " CMD_TARGET_PANE_USAGE " shell-command",
0,
NULL,
NULL,
cmd_run_shell_exec
};

View File

@ -37,7 +37,6 @@ const struct cmd_entry cmd_save_buffer_entry = {
"[-a] " CMD_BUFFER_USAGE " path",
0,
NULL,
NULL,
cmd_save_buffer_exec
};
@ -47,7 +46,6 @@ const struct cmd_entry cmd_show_buffer_entry = {
CMD_BUFFER_USAGE,
0,
NULL,
NULL,
cmd_save_buffer_exec
};

View File

@ -33,7 +33,6 @@ const struct cmd_entry cmd_select_layout_entry = {
"[-np] " CMD_TARGET_WINDOW_USAGE " [layout-name]",
0,
cmd_select_layout_key_binding,
NULL,
cmd_select_layout_exec
};
@ -43,7 +42,6 @@ const struct cmd_entry cmd_next_layout_entry = {
CMD_TARGET_WINDOW_USAGE,
0,
NULL,
NULL,
cmd_select_layout_exec
};
@ -53,7 +51,6 @@ const struct cmd_entry cmd_previous_layout_entry = {
CMD_TARGET_WINDOW_USAGE,
0,
NULL,
NULL,
cmd_select_layout_exec
};

View File

@ -33,7 +33,6 @@ const struct cmd_entry cmd_select_pane_entry = {
"[-lDLRU] " CMD_TARGET_PANE_USAGE,
0,
cmd_select_pane_key_binding,
NULL,
cmd_select_pane_exec
};
@ -43,7 +42,6 @@ const struct cmd_entry cmd_last_pane_entry = {
CMD_TARGET_WINDOW_USAGE,
0,
NULL,
NULL,
cmd_select_pane_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_select_window_entry = {
"[-lnpT] " CMD_TARGET_WINDOW_USAGE,
0,
cmd_select_window_key_binding,
NULL,
cmd_select_window_exec
};
@ -45,7 +44,6 @@ const struct cmd_entry cmd_next_window_entry = {
"[-a] " CMD_TARGET_SESSION_USAGE,
0,
cmd_select_window_key_binding,
NULL,
cmd_select_window_exec
};
@ -55,7 +53,6 @@ const struct cmd_entry cmd_previous_window_entry = {
"[-a] " CMD_TARGET_SESSION_USAGE,
0,
cmd_select_window_key_binding,
NULL,
cmd_select_window_exec
};
@ -65,7 +62,6 @@ const struct cmd_entry cmd_last_window_entry = {
CMD_TARGET_SESSION_USAGE,
0,
NULL,
NULL,
cmd_select_window_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_send_keys_entry = {
"[-lR] " CMD_TARGET_PANE_USAGE " key ...",
0,
NULL,
NULL,
cmd_send_keys_exec
};
@ -45,7 +44,6 @@ const struct cmd_entry cmd_send_prefix_entry = {
"[-2] " CMD_TARGET_PANE_USAGE,
0,
NULL,
NULL,
cmd_send_keys_exec
};

View File

@ -38,7 +38,6 @@ const struct cmd_entry cmd_server_info_entry = {
"",
0,
NULL,
NULL,
cmd_server_info_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_set_buffer_entry = {
CMD_BUFFER_USAGE " data",
0,
NULL,
NULL,
cmd_set_buffer_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_set_environment_entry = {
"[-gru] " CMD_TARGET_SESSION_USAGE " name [value]",
0,
NULL,
NULL,
cmd_set_environment_exec
};

View File

@ -67,7 +67,6 @@ const struct cmd_entry cmd_set_option_entry = {
"[-agosquw] [-t target-session|target-window] option [value]",
0,
NULL,
NULL,
cmd_set_option_exec
};
@ -77,7 +76,6 @@ const struct cmd_entry cmd_set_window_option_entry = {
"[-agoqu] " CMD_TARGET_WINDOW_USAGE " option [value]",
0,
NULL,
NULL,
cmd_set_option_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_show_environment_entry = {
"[-g] " CMD_TARGET_SESSION_USAGE " [name]",
0,
NULL,
NULL,
cmd_show_environment_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_show_messages_entry = {
CMD_TARGET_CLIENT_USAGE,
0,
NULL,
NULL,
cmd_show_messages_exec
};

View File

@ -40,7 +40,6 @@ const struct cmd_entry cmd_show_options_entry = {
"[-gqsvw] [-t target-session|target-window] [option]",
0,
NULL,
NULL,
cmd_show_options_exec
};
@ -50,7 +49,6 @@ const struct cmd_entry cmd_show_window_options_entry = {
"[-gv] " CMD_TARGET_WINDOW_USAGE " [option]",
0,
NULL,
NULL,
cmd_show_options_exec
};

View File

@ -37,7 +37,6 @@ const struct cmd_entry cmd_source_file_entry = {
"path",
0,
NULL,
NULL,
cmd_source_file_exec
};

View File

@ -36,7 +36,6 @@ const struct cmd_entry cmd_split_window_entry = {
"[-dhvP] [-c start-directory] [-F format] [-p percentage|-l size] "
CMD_TARGET_PANE_USAGE " [command]",
0,
cmd_split_window_key_binding,
NULL,
cmd_split_window_exec
};

View File

@ -32,7 +32,6 @@ const struct cmd_entry cmd_start_server_entry = {
"",
CMD_STARTSERVER,
NULL,
NULL,
cmd_start_server_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_suspend_client_entry = {
CMD_TARGET_CLIENT_USAGE,
0,
NULL,
NULL,
cmd_suspend_client_exec
};

View File

@ -35,7 +35,6 @@ const struct cmd_entry cmd_swap_pane_entry = {
"[-dDU] " CMD_SRCDST_PANE_USAGE,
0,
cmd_swap_pane_key_binding,
NULL,
cmd_swap_pane_exec
};

View File

@ -34,7 +34,6 @@ const struct cmd_entry cmd_swap_window_entry = {
"[-d] " CMD_SRCDST_WINDOW_USAGE,
0,
NULL,
NULL,
cmd_swap_window_exec
};

View File

@ -36,7 +36,6 @@ const struct cmd_entry cmd_switch_client_entry = {
"[-lnpr] [-c target-client] [-t target-session]",
CMD_READONLY,
cmd_switch_client_key_binding,
NULL,
cmd_switch_client_exec
};

View File

@ -26,7 +26,6 @@
* Unbind key from command.
*/
enum cmd_retval cmd_unbind_key_check(struct args *);
enum cmd_retval cmd_unbind_key_exec(struct cmd *, struct cmd_q *);
enum cmd_retval cmd_unbind_key_table(struct cmd *, struct cmd_q *, int);
@ -36,20 +35,9 @@ const struct cmd_entry cmd_unbind_key_entry = {
"[-acn] [-t key-table] key",
0,
NULL,
cmd_unbind_key_check,
cmd_unbind_key_exec
};
enum cmd_retval
cmd_unbind_key_check(struct args *args)
{
if (args_has(args, 'a') && args->argc != 0)
return (CMD_RETURN_ERROR);
if (!args_has(args, 'a') && args->argc != 1)
return (CMD_RETURN_ERROR);
return (CMD_RETURN_NORMAL);
}
enum cmd_retval
cmd_unbind_key_exec(struct cmd *self, struct cmd_q *cmdq)
{
@ -58,13 +46,23 @@ cmd_unbind_key_exec(struct cmd *self, struct cmd_q *cmdq)
int key;
if (!args_has(args, 'a')) {
if (args->argc != 1) {
cmdq_error(cmdq, "missing key");
return (CMD_RETURN_ERROR);
}
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]);
return (CMD_RETURN_ERROR);
}
} else
} else {
if (args->argc != 0) {
cmdq_error(cmdq, "key given with -a");
return (CMD_RETURN_ERROR);
}
key = KEYC_NONE;
}
if (args_has(args, 't'))
return (cmd_unbind_key_table(self, cmdq, key));

View File

@ -32,7 +32,6 @@ const struct cmd_entry cmd_unlink_window_entry = {
"[-k] " CMD_TARGET_WINDOW_USAGE,
0,
NULL,
NULL,
cmd_unlink_window_exec
};

View File

@ -36,7 +36,6 @@ const struct cmd_entry cmd_wait_for_entry = {
"[-LSU] channel",
0,
NULL,
NULL,
cmd_wait_for_exec
};

2
cmd.c
View File

@ -254,8 +254,6 @@ cmd_parse(int argc, char **argv, const char *file, u_int line, char **cause)
goto usage;
if (entry->args_upper != -1 && args->argc > entry->args_upper)
goto usage;
if (entry->check != NULL && entry->check(args) != 0)
goto usage;
cmd = xcalloc(1, sizeof *cmd);
cmd->entry = entry;

7
grid.c
View File

@ -268,8 +268,7 @@ grid_get_cell(struct grid *gd, u_int px, u_int py)
/* Set cell at relative position. */
void
grid_set_cell(
struct grid *gd, u_int px, u_int py, const struct grid_cell *gc)
grid_set_cell(struct grid *gd, u_int px, u_int py, const struct grid_cell *gc)
{
if (grid_check_y(gd, py) != 0)
return;
@ -657,8 +656,8 @@ grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx,
* available.
*/
void
grid_duplicate_lines(
struct grid *dst, u_int dy, struct grid *src, u_int sy, u_int ny)
grid_duplicate_lines(struct grid *dst, u_int dy, struct grid *src, u_int sy,
u_int ny)
{
struct grid_line *dstl, *srcl;
u_int yy;

7
tmux.1
View File

@ -99,7 +99,9 @@ Force
.Nm
to assume the terminal supports 256 colours.
.It Fl C
Start in control mode.
Start in control mode (see the
.Sx CONTROL MODE
section).
Given twice
.Xo ( Fl CC ) Xc
disables echo.
@ -626,9 +628,10 @@ If it does exist, exit with 0.
Kill the
.Nm
server and clients and destroy all sessions.
.It Ic kill-session
.It Xo Ic kill-session
.Op Fl a
.Op Fl t Ar target-session
.Xc
Destroy the given session, closing any windows linked to it and no other
sessions, and detaching all clients attached to it.
If

2
tmux.h
View File

@ -1005,6 +1005,7 @@ struct window {
#define WINDOW_REDRAW 0x4
#define WINDOW_SILENCE 0x8
#define WINDOW_ZOOMED 0x10
#define WINDOW_ALERTFLAGS (WINDOW_BELL|WINDOW_ACTIVITY|WINDOW_SILENCE)
struct options options;
@ -1451,7 +1452,6 @@ struct cmd_entry {
int flags;
void (*key_binding)(struct cmd *, int);
int (*check)(struct args *);
enum cmd_retval (*exec)(struct cmd *, struct cmd_q *);
};

View File

@ -1243,6 +1243,7 @@ winlink_clear_flags(struct winlink *wl)
continue;
wm->flags &= ~WINLINK_ALERTFLAGS;
wm->window->flags &= ~WINDOW_ALERTFLAGS;
server_status_session(s);
}
}