tmux/Command/Prompt/Q/How can I see the history of commands I entered?
Properties
- logseq-entity
- Logseq/Entity/Question
- see-also
- tmux/Option/status-keys
How can I see the history of commands I entered at the tmux/Command/Prompt? And what is that prompt called?
AI Answer
- Answer/Official from tmux(1), STATUS LINE
- Short answer:
show-prompt-history(aliasshowphist) prints everything typed at the prompt this server has kept; inside the prompt itself, Key/Arrow/Up and Key/Arrow/Down walk the same list. The prompt is called the command prompt —command-promptis the command that opens it. Seeing the history with tmux/Command/show-prompt-history
tmux show-prompt-historydisplays history for every prompt type.-T <prompt-type>narrows it to one ofcommand,search,target,window-target.- Each prompt type keeps its own list, so a
:command and a/search never mix: - The newest entry is last, and the numbering restarts per type.
tmux clear-prompt-history(aliasclearphist) wipes it,-Tfor a single type.- From inside the prompt, Key/Arrow/Up and Key/Arrow/Down recall the previous and next entry. Which other editing keys work is set by tmux/Option/status-keys.
Making it outlive the server
- Prompt history lives in the running server's memory, so
kill-server, a reboot, or a crash takes it with them. history-file(server option, empty by default) points at a file tmux writes prompt history to on exit and reads back on start. In tmux/Config:prompt-history-limit(server option, default100) caps entries per prompt type.history-limitis unrelated — that one is pane scrollback.
- Prompt history lives in the running server's memory, so
What the prompt is called
- The wiki and the man page both call it the command prompt: an interactive prompt opened with
Prefix :that replaces the status line, and the command behind it iscommand-prompt. - The man page documents it under STATUS LINE, and the sibling commands there name it the status prompt —
clear-prompt-historyreads "Clear status prompt history". Same thing; the wording follows where the prompt is drawn. - Every prompt in tmux is this one widget with a prompt type attached: copy-mode
/runscommand-prompt -T search,Prefix 'runs-T window-target,Prefix .runs-T target. Prompts bound without-T— rename session, rename window,Prefix f— fall into thecommandtype, so a session name typed at a rename prompt shows up in thecommandhistory alongside real commands.
- The wiki and the man page both call it the command prompt: an interactive prompt opened with