# libtmux.Pane.display_message

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

```
libtmux.Pane.display_message(
    self,
    cmd: str,
    get_text: t.Literal[True],
    format_string: str | None = ...,
    all_formats: bool | None = ...,
    verbose: bool | None = ...,
    no_expand: bool | None = ...,
    target_client: str | None = ...,
    delay: int | None = ...,
    notify: bool | None = ...,
    update_pane: bool | None = ...,
) -> list[str]

libtmux.Pane.display_message(
    self,
    cmd: str,
    get_text: t.Literal[False] = ...,
    format_string: str | None = ...,
    all_formats: bool | None = ...,
    verbose: bool | None = ...,
    no_expand: bool | None = ...,
    target_client: str | None = ...,
    delay: int | None = ...,
    notify: bool | None = ...,
    update_pane: bool | None = ...,
) -> None

libtmux.Pane.display_message(
    self,
    cmd: str,
    get_text: bool = False,
    format_string: str | None = None,
    all_formats: bool | None = None,
    verbose: bool | None = None,
    no_expand: bool | None = None,
    target_client: str | None = None,
    delay: int | None = None,
    notify: bool | None = None,
    update_pane: bool | None = None,
) -> list[str] | None
```

Display message to pane.

Displays a message in target-client status line.
The ``get_text=False`` path renders in the status line and is not
programmatically verifiable; only ``get_text=True`` returns output.

### Notes

Stderr from tmux is reported via :func:`warnings.warn`, not raised.
Callers that want to escalate to an exception can wrap the call in
:func:`warnings.catch_warnings` with ``filterwarnings("error")``.

## Changed

0.57 — Reports stderr via :func:`warnings.warn` instead of raising.

## Parameters

- `cmd` (`str`): Special parameters to request from pane.
- `get_text` (`bool`): Returns only text without displaying a message in
target-client status line.
- `format_string` (`str | None`): Format string for output (``-F`` flag). (added 0.56)
- `all_formats` (`bool | None`): List all format variables (``-a`` flag). (added 0.56)
- `verbose` (`bool | None`): Show format variable types (``-v`` flag). (added 0.56)
- `no_expand` (`bool | None`): Suppress format expansion; output is returned as a literal string
(``-l`` flag). Requires tmux 3.4+. (added 0.56)
- `target_client` (`str | None`): Target client (``-c`` flag). (added 0.56)
- `delay` (`int | None`): Display time in milliseconds (``-d`` flag). (added 0.56)
- `notify` (`bool | None`): Do not wait for input (``-N`` flag). (added 0.56)
- `update_pane` (`bool | None`): Allow the pane to keep updating while the message is displayed
(``-C`` flag). By default tmux freezes the pane while a status
message is shown. Requires tmux 3.6+ (introduced upstream by
commit ``80eb460f``). (added 0.56)

## Returns

list[str] | None
    Message output if get_text is True, otherwise None.

## In other ports

### Show a message on the client viewing a pane

- TypeScript: [`pane.Pane.displayMessage`](/en/ts/latest/reference/pane-pane-displaymessage/) (method)
- Rust: [`pane.Pane.display`](/en/rs/latest/reference/pane-pane-display/) (method)
- Go: [`tmux.Pane.DisplayMessage`](/en/go/latest/reference/tmux-pane-displaymessage/) (method)
- C#: [`LibTmux.Pane.DisplayMessageAsync`](/en/csharp/latest/reference/libtmux-pane-displaymessageasync/) (method)
- C++: [`libtmux::Pane::show_message`](/en/cxx/latest/reference/libtmux-pane-show_message/) (method)
