tmux-logging
tmux-logging copied to clipboard
One line config in tmux.conf to turn "save-complete-history" always on?
Hi Author, really appreciate this tool. very helpful. I would like to propose a feature request One line config in tmux.conf to turn "save-complete-history" always on.
Also, better to be able to set the output-path in the conf
Is it something that you will be considering?
Hey, changing the logging output path and filename is already possible (just not documented). Take a look here.
As for the "save-complete-history" always on feature, I'll gladly accept a pull request for this.
@xinbenlv hi, did you find a way to turn "save-complete-history" always on?
I want to save my history always, for every pane that I create.
Came here looking for this feature as well, but for now I will try this workaround that seems to work. The idea is I usually exit shell by Ctrl+D, so I hijack that sequence to run the save history command and then tell Tmux to kill the pane, which results in my terminal closing as usual right after (I'm on Arch Linux using Alacritty and Zsh.):
bind-key -n C-d if-shell "$HOME/.tmux/plugins/tmux-logging/scripts/save_complete_history.sh" "send-keys exit Enter"
@CNG : Good idea, however, how can we have immediately enter? I feel a little delay when we have to wait somehow for the command to just display at bottom of screen.
@tuyenpm9 : I didn't see a way to adjust the message display time with the provided configuration, but you should apparently be able to either adjust the 5000 default at https://github.com/tmux-plugins/tmux-logging/blob/4d05440370b92244fb33e7fe7934f743fdab2354/scripts/shared.sh#L20 or add a value in save_complete_history.sh such as:
display_message "History saved to ${file}" 750
Related to always log: https://github.com/tmux-plugins/tmux-logging/issues/31
You could use ~/.tmux/plugins/tmux-logging/scripts/toggle_logging.sh in your .bash_profile.