There is no builtin way to do this but it seems like it would be trivial to
write a script to save all the buffers every few minutes and reload them
when you start the server, something like (to save):

mkdir -p ~/.tmux.d/buffers ~/.tmux.d/buffers.old
rm -f ~/.tmux.d/buffers.old/*
mv ~/.tmux.d/buffers/* ~/.tmux.d/buffers.old
tmux lsb -F '#{buffer_name}'|while read n; do
    tmux saveb -b $n ~/.tmux.d/buffers/$n
done

And to reload:

for n in ~/.tmux.d/buffers/*; do
     case $n in
           buffer*)
                tmux loadb $n
                ;;
           *)
                tmux loadb -b $(basename $n) $n
                ;;
       esac
done

This may need some tweaks to load automatic buffers in the right order
(maybe put #{buffer_created} in the name and sort by that?).



On Fri, 19 Nov 2021 at 17:41, Greg Mattson <[email protected]> wrote:

> all,
>
> I was hoping that there was a way to save all the buffers that I've
> attained through copy and paste. It really sucks to have a tmux die, only
> to have hundreds of buffers that I've accumulated die with it.
>
> Is there a way to save these buffers to a file and then reload them when I
> start a new tmux?
>
> thanks much..
>
> --
> You received this message because you are subscribed to the Google Groups
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/tmux-users/4b7eaf16-67ef-4d8e-bb08-3d84a44c4cf4n%40googlegroups.com
> <https://groups.google.com/d/msgid/tmux-users/4b7eaf16-67ef-4d8e-bb08-3d84a44c4cf4n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/tmux-users/CAEdLfcG6Ep8Z54CYneAfjPM0A%2BEy2tb2%2BCxu94eObVKvSHFPUA%40mail.gmail.com.

Reply via email to