# libtmux.Server.show_prompt_history

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/server.py#L1730
- **Page:** https://libtmux.org/en/py/stable/reference/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`](/en/tmux/latest/manual/show-prompt-history/).

## Examples

```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
```

## Parameters

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

## Returns

list[str]
    Prompt history lines.

## In other ports

### Read what has been typed at command prompts

- Rust: [`server.Server.prompt_history`](/en/rs/latest/reference/server-server-prompt_history/) (method)
- Go: [`tmux.Server.ShowPromptHistory`](/en/go/latest/reference/tmux-server-showprompthistory/) (method)
- Java: [`io.github.libtmux.Prompt.Prompt.history`](/en/java/latest/reference/io-github-libtmux-prompt-prompt-history/) (method)
- C#: [`LibTmux.Server.GetPromptHistoryAsync`](/en/csharp/latest/reference/libtmux-server-getprompthistoryasync/) (method)
