# libtmux.Pane.find_window

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/pane.py#L2156
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-pane-find_window/

tmux command: [`find-window`](/en/tmux/latest/manual/find-window/)

```
libtmux.Pane.find_window(
    self,
    match_string: str,
    match_content: bool | None = None,
    case_insensitive: bool | None = None,
    match_name: bool | None = None,
    regex: bool | None = None,
    match_title: bool | None = None,
) -> None
```

Search for a window matching a string via [`$ tmux find-window`](/en/tmux/latest/manual/find-window/).

Opens a [choose-tree](/en/tmux/latest/manual/choose-tree/) filtered to matching windows.

## Examples

```python
>>> pane.find_window('sh')
```

## Parameters

- `match_string` (`str`): String to search for in window names, titles, and content.
- `match_content` (`bool | None`): Match visible pane content (``-C`` flag).
- `case_insensitive` (`bool | None`): Case-insensitive matching (``-i`` flag).
- `match_name` (`bool | None`): Match window name only (``-N`` flag).
- `regex` (`bool | None`): Treat match string as a regex (``-r`` flag).
- `match_title` (`bool | None`): Match pane title (``-T`` flag).

## In other ports

### Search windows interactively from a pane

- TypeScript: [`pane.Pane.findWindow`](/en/ts/latest/reference/pane-pane-findwindow/) (method)
- Go: [`tmux.Pane.FindWindow`](/en/go/latest/reference/tmux-pane-findwindow/) (method)
- C#: [`LibTmux.Pane.FindWindowAsync`](/en/csharp/latest/reference/libtmux-pane-findwindowasync/) (method)
