# libtmux.Pane.choose_tree

- **Module:** libtmux.Pane
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/pane.py#L2104
- **Page:** https://libtmux.org/reference/py/libtmux-pane-choose_tree/

```
libtmux.Pane.choose_tree(self, sessions_collapsed: bool | None = None, windows_collapsed: bool | None = None, format_string: str | None = None, filter_expression: str | None = None, sort_order: t.Literal["index", "name", "time", "size"] | None = None, reverse: bool | None = None, zoom: bool | None = None) -> None
```

Enter tree chooser via ``$ tmux choose-tree``.

## Parameters

- `self`
- `sessions_collapsed` (bool | None) — Start with sessions collapsed (``-s`` flag).
- `windows_collapsed` (bool | None) — Start with windows collapsed (``-w`` flag).
- `format_string` (str | None) — Format for each item shown in the chooser (``-F`` flag).
- `filter_expression` (str | None) — Filter expression evaluated per item; only items whose
filter expands non-zero are shown (``-f`` flag).
- `sort_order` (t.Literal["index", "name", "time", "size"] | None) — Sort field (``-O`` flag).
- `reverse` (bool | None) — Reverse the sort order (``-r`` flag).
- `zoom` (bool | None) — Zoom the pane while the chooser is active (``-Z`` flag).

## Example

```python
>>> pane.choose_tree()
```
