-
Notifications
You must be signed in to change notification settings - Fork 149
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
added option: delete old continuum saves #14
base: master
Are you sure you want to change the base?
added option: delete old continuum saves #14
Conversation
Hey there! I tested this locally and things exploded in a couple places:
If you agree let's make deleting old files the default (explicit option needed to disable that), but let's increase the number of files saved by default to last 7 days. We'll probably need to do a little math there: we wanna take the value of Also, can we change
Thanks! |
Hey cool,
If we want to only delete files older than 7 days - which I think is a good idea - trying to determine the files age based on how many files are present multiplied by the file creation rate - will cause 2 problems that I can see
Fortunately this "older than 7 days test" is easy to achieve with
Where
If that sounds good to you, I'll work it into the code and re-submit |
Have now implemented the discussed changes.
I have tested this as working on Ubuntu 14.04 for the following
|
Will this be merged? Is there anything else that needs to be addressed? I am willing to contribute. |
@christarazi
If we can get the code working across as many OS'es as possible, it might help to get it moving forward. |
I will test it over the next few days. I will let you as soon as possible. I modified the command to delete files older than 1 day, so that I don't have to wait a week to get back to you on the results. By the way, I am running Arch Linux. Edit: @michael-coleman It works perfectly for me. The command I'm using is $ find ~/.tmux/resurrect -type f -name "tmux_resurrect_*.txt" -mtime +0 which is basically deleting the resurrect files that are older than 24 hours. |
@michael-coleman @bruno- How is this branch looking? |
Hey guys, Can you check that one and close this PR if all the features are there? |
@bruno- The one major difference I spotted was that this pull request has an option to enable deleting backups, while the other one does not. I think it would be more useful for people to have an option. I don't mind doing a pull request myself, just would like to hear your opinion before starting. Thanks. |
Per the discussion on this issue this commit adds the functionality to delete old tmux-continuum saves.
This code doesn't change the default behaviour of continuum, but for those users who want to stop the
~/.tmux/resurrect
folder filling up with old save files, they can enable this by adding this line to~/.tmux.conf
Note: the option uses this code provided by @gdebat, i.e.
It retains the last 7 saves - but any additional saves beyond those 7 will be deleted.