aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-25 12:18:51 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-25 12:18:51 +0000
commit7b847ced4af09b7da66a7b0b59fbab68f07bcb50 (patch)
tree4f616b2184ffe0c246920882ab093fc44a71af94 /tmux.h
parent4f1d81c4ce89440bd2f155cbb8002b622f13ce0b (diff)
downloadrtmux-7b847ced4af09b7da66a7b0b59fbab68f07bcb50.tar.gz
rtmux-7b847ced4af09b7da66a7b0b59fbab68f07bcb50.tar.bz2
rtmux-7b847ced4af09b7da66a7b0b59fbab68f07bcb50.zip
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).
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tmux.h b/tmux.h
index 1f3cf74d..aaa1190c 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1268,10 +1268,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;