summaryrefslogtreecommitdiffstats
path: root/key-bindings.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-13 01:08:40 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-13 01:08:40 +0000
commit98c85cf989a951c28e536e10de147b3263d934ce (patch)
tree4a685e79d8097ab8c62dd28bd641cbff612d50f9 /key-bindings.c
parent9ab200843e7f2167129cacfe83aeca6a502a374e (diff)
command-prompt now accepts a single argument, a template string. Any occurrences of %% in this string are replaced by whatever is entered at the prompt and the result is executed as a command. This allows things like (now bound by default):
bind , command-prompt "rename-window %%" Or my favourite: bind x command-prompt "split-window 'man %%'"
Diffstat (limited to 'key-bindings.c')
-rw-r--r--key-bindings.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/key-bindings.c b/key-bindings.c
index 60b223f4..f3ce1bb8 100644
--- a/key-bindings.c
+++ b/key-bindings.c
@@ -1,4 +1,4 @@
-/* $Id: key-bindings.c,v 1.44 2009-01-12 19:23:14 nicm Exp $ */
+/* $Id: key-bindings.c,v 1.45 2009-01-13 01:08:40 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -80,6 +80,7 @@ key_bindings_init(void)
{ '"', &cmd_split_window_entry },
{ '#', &cmd_list_buffers_entry },
{ '&', &cmd_kill_window_entry },
+ { ',', &cmd_command_prompt_entry },
{ '-', &cmd_delete_buffer_entry },
{ '0', &cmd_select_window_entry },
{ '1', &cmd_select_window_entry },