summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-list-keys.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2013-03-22 15:52:40 +0000
committernicm <nicm@openbsd.org>2013-03-22 15:52:40 +0000
commit94d83468da0ca9948bdfb09670093a495fa9e7ed (patch)
treef252d7f24998089dd08e49d99870325351edefed /usr.bin/tmux/cmd-list-keys.c
parentAdd -e flag to capture-pane to include embedded ANSI SGR escape (diff)
downloadwireguard-openbsd-94d83468da0ca9948bdfb09670093a495fa9e7ed.tar.xz
wireguard-openbsd-94d83468da0ca9948bdfb09670093a495fa9e7ed.zip
Add copy-pipe mode command to copy selection and also pipe to a command.
Diffstat (limited to 'usr.bin/tmux/cmd-list-keys.c')
-rw-r--r--usr.bin/tmux/cmd-list-keys.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-list-keys.c b/usr.bin/tmux/cmd-list-keys.c
index 534ed927504..9a2b27963d9 100644
--- a/usr.bin/tmux/cmd-list-keys.c
+++ b/usr.bin/tmux/cmd-list-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-list-keys.c,v 1.19 2012/10/15 21:53:30 nicm Exp $ */
+/* $OpenBSD: cmd-list-keys.c,v 1.20 2013/03/22 15:52:40 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -138,9 +138,12 @@ cmd_list_keys_table(struct cmd *self, struct cmd_ctx *ctx)
mode = "c";
cmdstr = mode_key_tostring(mtab->cmdstr, mbind->cmd);
if (cmdstr != NULL) {
- ctx->print(ctx, "bind-key -%st %s%s %*s %s",
+ ctx->print(ctx, "bind-key -%st %s%s %*s %s%s%s%s",
mode, any_mode && *mode == '\0' ? " " : "",
- mtab->name, (int) width, key, cmdstr);
+ mtab->name, (int) width, key, cmdstr,
+ mbind->arg != NULL ? " \"" : "",
+ mbind->arg != NULL ? mbind->arg : "",
+ mbind->arg != NULL ? "\"": "");
}
}