aboutsummaryrefslogtreecommitdiff
path: root/cmd-command-prompt.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-07-04 08:22:37 +0000
committerTiago Cunha <tcunha@gmx.com>2011-07-04 08:22:37 +0000
commitfce026eb32292f412d4fda8cfc495da7b655e99d (patch)
treed7b359620ebe16e1369c43f94f671e17c8f054b0 /cmd-command-prompt.c
parente097f0b4ee30352ef1ea37ef030838b634fdf27e (diff)
downloadrtmux-fce026eb32292f412d4fda8cfc495da7b655e99d.tar.gz
rtmux-fce026eb32292f412d4fda8cfc495da7b655e99d.tar.bz2
rtmux-fce026eb32292f412d4fda8cfc495da7b655e99d.zip
Sync OpenBSD patchset 928:
Include the existing window and session name in the prompt when renaming and add a new key binding ($) for rename session. From Tiago Cunha.
Diffstat (limited to 'cmd-command-prompt.c')
-rw-r--r--cmd-command-prompt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c
index 49a979ea..ba18cbc5 100644
--- a/cmd-command-prompt.c
+++ b/cmd-command-prompt.c
@@ -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 '%%'");