tmux-plugins / tmux-logging

Easy logging and screen capturing for Tmux.
MIT License
1.03k stars 113 forks source link

Needs a save-complete-history & start logging logging to same file #38

Open bedge opened 5 years ago

bedge commented 5 years ago

Usually when one decides to enable logging, what is in the scrollback is often of interest as it may contain the specific example of what one wants to log.

I'd like to have a command that both:

ie: A combination of: save_complete_history.sh and start_logging.sh

Such that this can be a key assignment.

bedge commented 5 years ago

Fixed in https://github.com/tmux-plugins/tmux-logging/pull/39

Added script snapshot_and_log.sh

Kr1ss-XD commented 5 years ago

A custom keybinding should also do the trick :

bind-key C-x run-shell "$HOME/.tmux/plugins/tmux-logging/scripts/save_complete_history.sh" \; run-shell "$HOME/.tmux/plugins/tmux-logging/scripts/toggle_logging.sh"
bedge commented 5 years ago

Those use different filename settings. I wanted on that used the same name as I had configured for logging. The above could also save the scrollback, and stop logging (using toggle)

Although, my patch may overwrite the current log file with the snapshot if you're already logging.... didn't think of that.