From 98c85cf989a951c28e536e10de147b3263d934ce Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 13 Jan 2009 01:08:40 +0000 Subject: 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 %%'" --- key-bindings.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'key-bindings.c') 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 @@ -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 }, -- cgit