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

Save scrollback and start logging as single function

Open bedge opened this issue 6 years ago • 5 comments

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.

bedge avatar May 25 '19 15:05 bedge

Updated PR to fix https://github.com/tmux-plugins/tmux-logging/issues/38 as well

bedge avatar May 25 '19 16:05 bedge

OK, got carried away. Added README updates, and key bindings for the snapshot_and_log. Hope this fits with your plans.

bedge avatar May 25 '19 17:05 bedge

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.

bedge avatar Aug 13 '19 23:08 bedge

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 avatar Jun 07 '20 04:06 codydiehl

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

bedge avatar Jun 07 '20 22:06 bedge