# libtmux.Server.show_prompt_history

- **Module:** libtmux.Server
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/server.py#L1733
- **Page:** https://libtmux.org/reference/py/libtmux-server-show_prompt_history/

```
libtmux.Server.show_prompt_history(self, prompt_type: t.Literal["command", "search", "target", "window-target"] | None = None) -> list[str]
```

Show prompt history via ``$ tmux show-prompt-history``.

## Parameters

- `self`
- `prompt_type` (t.Literal["command", "search", "target", "window-target"] | None) — Prompt type to show (``-T`` flag).

## Returns

list[str]
    Prompt history lines.

## Example

```python
>>> from libtmux.common import has_gte_version
>>> if has_gte_version("3.3"):
...     result = server.show_prompt_history()
... else:
...     result = []
>>> isinstance(result, list)
True
```
