Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bedge opened this issue May 25, 2019 · 3 comments
Open

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

bedge opened this issue May 25, 2019 · 3 comments

Comments

@bedge
Copy link

bedge commented May 25, 2019

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:

  • captures the scrollback
  • enables logging to the same filename as the scrollback

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

Such that this can be a key assignment.

@bedge
Copy link
Author

bedge commented May 25, 2019

Fixed in #39

Added script snapshot_and_log.sh

@Kr1ss-XD
Copy link

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
Copy link
Author

bedge commented May 25, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants