Open bedge opened 5 years ago
Updated PR to fix https://github.com/tmux-plugins/tmux-logging/issues/38 as well
OK, got carried away. Added README updates, and key bindings for the snapshot_and_log. Hope this fits with your plans.
Can I get a review on this? Been working splendidly for me:
Enabling shows this on the statusline:
History saved and logging started to /Users/bedge/log/tmux/2019-08-13/deng-2.log
Lets you "forget" to enable logging for an important thing, then go back and log the whole scrollback buffer and start logging everything after that.
Is there a way to stop the logging once it has began using the snapshot_and_log.sh
?
seems the toggle_logging.sh
simply starts a new logging session when this is already logging the current pane.
I think it might be good to integrate an additional stop function. While not a necessity it would be full featured to do so.
Looks like would need to track whether we are already logging with a similar yet new function to the is_logging()
found in the toggle_logging.sh
script and then the function to turn it off by simply running the script again in the same pane that it was already started within.
I will take a look if i can get some time, but wanted to post here to see if there was something I was missing before trying to implement it myself.
@codydiehl, I agree completely. This PR was a quick hack to add a missing toggle. I expect there's more than one case it's missing. Glad to see it's getting a second look.
Fixes https://github.com/tmux-plugins/tmux-logging/issues/31
Note that a cleaner solution may be to restructure the toggle/start scripts so that the block I added didn't need to replicate the context read that already exists in the toggle script.