mirror of
https://github.com/tmux/tmux.git
synced 2025-09-04 06:56:58 +00:00
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 %%'"
This commit is contained in:
@ -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 },
|
||||
|
Reference in New Issue
Block a user