The default binding for prefixs is:
bind-key -T prefix s choose-tree -s
So it's indeed about
choose-tree. This is what the manual says:
choose-tree [-GNrswZ] [-F format] [-f filter] [-O sort-order] [-t target-pane] [template]
Put a pane into tree mode, where a session, window or pane may be chosen interactively from a list.
-s starts with sessions collapsed and
-w with windows collapsed.
-Z zooms the pane. The following keys may be used in tree mode:
Enter Choose selected item
Up Select previous item
Down Select next item
x Kill selected item
X Kill tagged items
< Scroll list of previews left
> Scroll list of previews right
C-s Search by name
n Repeat last search
t Toggle if item is tagged
T Tag no items
C-t Tag all items
: Run a command for each tagged item
f Enter a format to filter items
O Change sort field
r Reverse sort order
v Toggle preview
q Exit mode
After a session, window or pane is chosen,
%% is replaced by the target in template and the result executed as a command. If template is not given,
switch-client -t '%%' is used.
-O specifies the initial sort field: one of
-r reverses the sort order.
-f specifies an initial filter: the filter is a format - if it evaluates to zero, the item in the list is not shown, otherwise it is shown. If a filter would lead to an empty list, it is ignored.
-F specifies the format for each item in the tree.
-N starts without the preview.
-G includes all sessions in any session groups in the tree rather than only the first. This command works only if at least one client is attached.
Not all keys work in older versions of
tmux though. Refer to
man 1 tmux in your OS.
can I terminate or rename a session directly from this screen?
Terminate – yes, with x or X.
Semi-directly, with : and the desired command, e.g.:
rename-session -t '%%' fooEnter
kill-session -t '%%'Enter
Or you can invoke/bind your own variant of
choose-tree that will kill session(s) with Enter thanks to a "killing" template you provide:
choose-tree -s "kill-session -t '%%'"
Note you can run a command for multiple items; you just need to tag them with t first. This can be useful with
kill-session, maybe less useful with