mirror of
https://github.com/tmate-io/tmate.git
synced 2026-07-29 05:40:02 +00:00
Include the existing window and session name in the prompt when renaming
and add a new key binding ($) for rename session. From Tiago Cunha.
This commit is contained in:
parent
ad60a2c952
commit
94f86edfee
3 changed files with 8 additions and 0 deletions
|
|
@ -59,8 +59,13 @@ void
|
|||
cmd_command_prompt_key_binding(struct cmd *self, int key)
|
||||
{
|
||||
switch (key) {
|
||||
case '$':
|
||||
self->args = args_create(1, "rename-session '%%'");
|
||||
args_set(self->args, 'I', "#S");
|
||||
break;
|
||||
case ',':
|
||||
self->args = args_create(1, "rename-window '%%'");
|
||||
args_set(self->args, 'I', "#W");
|
||||
break;
|
||||
case '.':
|
||||
self->args = args_create(1, "move-window -t '%%'");
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ key_bindings_init(void)
|
|||
{ '!', 0, &cmd_break_pane_entry },
|
||||
{ '"', 0, &cmd_split_window_entry },
|
||||
{ '#', 0, &cmd_list_buffers_entry },
|
||||
{ '$', 0, &cmd_command_prompt_entry },
|
||||
{ '%', 0, &cmd_split_window_entry },
|
||||
{ '&', 0, &cmd_confirm_before_entry },
|
||||
{ '(', 0, &cmd_switch_client_entry },
|
||||
|
|
|
|||
2
tmux.1
2
tmux.1
|
|
@ -233,6 +233,8 @@ Break the current pane out of the window.
|
|||
Split the current pane into two, top and bottom.
|
||||
.It #
|
||||
List all paste buffers.
|
||||
.It $
|
||||
Rename the current session.
|
||||
.It %
|
||||
Split the current pane into two, left and right.
|
||||
.It &
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue