aboutsummaryrefslogtreecommitdiff
path: root/tmux.1
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.1
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.1')
-rw-r--r--tmux.155
1 files changed, 49 insertions, 6 deletions
diff --git a/tmux.1 b/tmux.1
index bedf404b..fa97cf3b 100644
--- a/tmux.1
+++ b/tmux.1
@@ -622,14 +622,57 @@ off from its containing window to make it the only pane in a new window.
If
.Fl d
is given, the new window does not become the current window.
-.It Ic choose-session Op Fl t Ar target-window
-Put a window into session choice mode, where the session for the current
-client may be selected interactively from a list.
+.It Xo
+.Ic choose-client
+.Op Fl t Ar target-window
+.Op Ar template
+.Xc
+Put a window into client choice mode, allowing a client to be selected
+interactively from a list.
+After a client is chosen,
+.Ql %%
+is replaced by the client
+.Xr pty 4
+path in
+.Ar template
+and the result executed as a command.
+If
+.Ar template
+is not given, "detach-client -t '%%'" is used.
+This command works only from inside
+.Nm .
+.It Xo
+.Ic choose-session
+.Op Fl t Ar target-window
+.Op Ar template
+.Xc
+Put a window into session choice mode, where a session may be selected
+interactively from a list.
+When one is chosen,
+.Ql %%
+is replaced by the session name in
+.Ar template
+and the result executed as a command.
+If
+.Ar template
+is not given, "switch-client -t '%%'" is used.
This command works only from inside
.Nm .
-.It Ic choose-window Op Fl t Ar target-window
-Put a window into window choice mode, where the window for the session
-attached to the current client may be selected interactively from a list.
+.It Xo
+.Ic choose-window
+.Op Fl t Ar target-window
+.Op Ar template
+.Xc
+Put a window into window choice mode, where a window may be chosen
+interactively from a list.
+After a window is selected,
+.Ql %%
+is replaced by the session name and window index in
+.Ar template
+and the result executed as a command.
+If
+.Ar template
+is not given, "select-window -t '%%'" is used.
This command works only from inside
.Nm .
.It Ic down-pane Op Fl t Ar target-pane