tmuxtmuxCLI Manual

Choose documentation 1

3.7c

tmux manual version

Latest (3.7c) 3.7c 3.2a
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

tmux choose-tree

Put a pane into tree mode, where a session, window or pane may be chosen interactively from a tree.

Syntax

tmux choose-tree [-GNrswZ] [-F format] [-f filter] [-K key-format] [-O sort-order] [-t target-pane] [template]

Behavior

Put a pane into tree mode, where a session, window or pane may be chosen interactively from a tree. Each session, window or pane is shown on one line. A shortcut key is shown on the left in brackets allowing for immediate choice, or the tree may be navigated and an item chosen or otherwise manipulated using the keys below. -s starts with sessions collapsed and -w with windows collapsed. -Z zooms the pane. -y disables any confirmation prompts. The following keys may be used in tree mode:
Choose selected item
Select previous item
Select next item
S-Up Swap the current window with the previous one
S-Down Swap the current window with the next one
Expand selected item
- Collapse selected item
M-+ Expand all items
M-- Collapse all items
Kill selected item
Kill tagged items
Scroll list of previews left
Scroll list of previews right
C-s Search by name
Set the marked pane
Clear the marked pane
Repeat last search forwards
Repeat last search backwards
Toggle if item is tagged
Tag no items
C-t Tag all items
Run a command for each tagged item
Enter a format to filter items
Jump to the starting pane
Change sort order
Reverse sort order
Toggle preview
Display help
Exit mode

After a session, window or pane is chosen, the first instance of ‘%%’ and all instances of ‘%1’ are 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 order: one of ‘index’, ‘name’, ‘activity’ (time) or ‘z’. -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 and -K a format for each shortcut key; both are evaluated once for each line. -N starts without the preview or if given twice with the larger 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.

C implementation

Internal declarations in tmux 3.7c:

Use from a library

Each API describes its own defaults, errors and execution model.

tmux sources and license

Syntax comes from tmux 3.7c list-commands. See the global options for sockets and configuration, and command syntax and targets.

Behavior is taken from the tmux 3.7c manual.

Command declaration

Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Esc

Type to search.