Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux tmux能否将命令保存到文件中,如.bash\u history?_Linux_History_Tmux - Fatal编程技术网

Linux tmux能否将命令保存到文件中,如.bash\u history?

Linux tmux能否将命令保存到文件中,如.bash\u history?,linux,history,tmux,Linux,History,Tmux,tmux是否支持将在“C-b:”模式下键入的命令保存到文件中?我宁愿查看我已经键入的命令,也不必在手册页中查找每个命令。有一个历史文件选项,可以满足您的需要 历史文件路径 如果不是空的,则是一个文件,tmux将在退出时将命令提示符历史记录写入该文件,并在启动时将其加载 将此添加到.tmux.conf set -g history-file ~/.tmux_history 注意它是在2.1版本中添加的。如果您有较旧版本的tmux,请阅读

tmux是否支持将在“C-b:”模式下键入的命令保存到文件中?我宁愿查看我已经键入的命令,也不必在手册页中查找每个命令。

有一个
历史文件
选项,可以满足您的需要

历史文件路径

如果不是空的,则是一个文件,tmux将在退出时将命令提示符历史记录写入该文件,并在启动时将其加载

将此添加到
.tmux.conf

set -g history-file ~/.tmux_history
注意它是在2.1版本中添加的。如果您有较旧版本的tmux,请阅读