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

◇◆丶佛笑我妖孽 提交于 2019-12-07 01:23:04

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/39368285/can-tmux-save-commands-to-a-file-like-bash-history

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!