tmux-logging icon indicating copy to clipboard operation
tmux-logging copied to clipboard

One line config in tmux.conf to turn "save-complete-history" always on?

Open xinbenlv opened this issue 10 years ago • 8 comments

xinbenlv avatar Apr 03 '15 18:04 xinbenlv

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?

xinbenlv avatar Apr 03 '15 18:04 xinbenlv

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.

bruno- avatar Apr 03 '15 19:04 bruno-

@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.

k3rne avatar Jun 11 '18 18:06 k3rne

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 avatar Jul 05 '18 06:07 CNG

@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.

ghost avatar Aug 27 '18 11:08 ghost

@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

CNG avatar Jan 26 '19 07:01 CNG

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.

bedge avatar May 25 '19 15:05 bedge