mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 14:27:09 +00:00
Sync OpenBSD patchset 294:
Add a choose-client command and extend choose-{session,window} to accept a template. After a choice is made, %% (or %1) in the template is replaced by the name of the session, window or client suitable for -t and the result executed as a command. So, for example, "choose-window "killw -t '%%'"" will kill the selected window. The defaults if no template is given are (as now) select-window for choose-window, switch-client for choose-session, and detach-client for choose-client (now bound to D).
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: key-bindings.c,v 1.80 2009-08-24 16:24:18 tcunha Exp $ */
|
||||
/* $Id: key-bindings.c,v 1.81 2009-08-25 13:53:39 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -130,6 +130,7 @@ key_bindings_init(void)
|
||||
{ ']', 0, &cmd_paste_buffer_entry },
|
||||
{ 'c', 0, &cmd_new_window_entry },
|
||||
{ 'd', 0, &cmd_detach_client_entry },
|
||||
{ 'D', 0, &cmd_choose_client_entry },
|
||||
{ 'f', 0, &cmd_command_prompt_entry },
|
||||
{ 'i', 0, &cmd_display_message_entry },
|
||||
{ 'l', 0, &cmd_last_window_entry },
|
||||
@ -143,7 +144,7 @@ key_bindings_init(void)
|
||||
{ 'x', 0, &cmd_confirm_before_entry },
|
||||
{ '{', 0, &cmd_swap_pane_entry },
|
||||
{ '}', 0, &cmd_swap_pane_entry },
|
||||
{ '\002', 0, &cmd_send_prefix_entry },
|
||||
{ '\002', /* C-b */ 0, &cmd_send_prefix_entry },
|
||||
{ '1' | KEYC_ESCAPE, 0, &cmd_select_layout_entry },
|
||||
{ '2' | KEYC_ESCAPE, 0, &cmd_select_layout_entry },
|
||||
{ '3' | KEYC_ESCAPE, 0, &cmd_select_layout_entry },
|
||||
@ -162,7 +163,7 @@ key_bindings_init(void)
|
||||
{ KEYC_LEFT | KEYC_CTRL, 1, &cmd_resize_pane_entry },
|
||||
{ KEYC_RIGHT | KEYC_CTRL, 1, &cmd_resize_pane_entry },
|
||||
{ 'o' | KEYC_ESCAPE, 0, &cmd_rotate_window_entry },
|
||||
{ '\017', 0, &cmd_rotate_window_entry },
|
||||
{ '\017', /* C-o */ 0, &cmd_rotate_window_entry },
|
||||
};
|
||||
u_int i;
|
||||
struct cmd *cmd;
|
||||
|
Reference in New Issue
Block a user