From 8fd77cbb5b9e81a14d52f9ddcf765d3ce557ed86 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Tue, 25 Aug 2009 13:53:39 +0000 Subject: Sync OpenBSD patchset 294: Add a choose-client command and extend choose-{session,window} to accept a template. After a choice is made, %% (or %1) in the template is replaced by the name of the session, window or client suitable for -t and the result executed as a command. So, for example, "choose-window "killw -t '%%'"" will kill the selected window. The defaults if no template is given are (as now) select-window for choose-window, switch-client for choose-session, and detach-client for choose-client (now bound to D). --- tmux.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 1057cd48..a56549dd 100644 --- a/tmux.h +++ b/tmux.h @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.428 2009-08-25 13:11:24 tcunha Exp $ */ +/* $Id: tmux.h,v 1.429 2009-08-25 13:53:39 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1266,10 +1266,12 @@ int cmd_find_index( struct cmd_ctx *, const char *, struct session **); struct winlink *cmd_find_pane(struct cmd_ctx *, const char *, struct session **, struct window_pane **); +char *cmd_template_replace(char *, const char *, int); extern const struct cmd_entry *cmd_table[]; extern const struct cmd_entry cmd_attach_session_entry; extern const struct cmd_entry cmd_bind_key_entry; extern const struct cmd_entry cmd_break_pane_entry; +extern const struct cmd_entry cmd_choose_client_entry; extern const struct cmd_entry cmd_choose_session_entry; extern const struct cmd_entry cmd_choose_window_entry; extern const struct cmd_entry cmd_clear_history_entry; -- cgit