Can tmux save commands to a file, like .bash_history?
Asked Answered
T

1

17

Does tmux support saving to a file the commands typed in "C-b :" mode ? I'd rather look through the ones I already typed than have to look each command up in the man page.

Truncheon answered 7/9, 2016 at 11:9 Comment(0)
H
23

There is history-file option which does what you are looking for.

history-file path

If not empty, a file to which tmux will write command prompt history on exit and load it from on start.

Add this to your .tmux.conf

set -g history-file ~/.tmux_history

Note it was added in 2.1 version. if you have older version of tmux read https://unix.stackexchange.com/questions/26548/write-all-tmux-scrollback-to-a-file

Hallagan answered 8/9, 2016 at 5:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.