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

Create an "Undo" feature #1

Open
Flaque opened this issue Feb 2, 2017 · 0 comments
Open

Create an "Undo" feature #1

Flaque opened this issue Feb 2, 2017 · 0 comments

Comments

@Flaque
Copy link
Owner

Flaque commented Feb 2, 2017

If users enter in the wrong template or they use the command in the wrong place, it may be nice to have an "undo" command by typing:

$ thaum -u

This could be implemented by writing to a temporary file. (afero) has a function for this. In that file, you could store a checksum and the path of each file that you created.

Then, when the user calls thaum -u, you check to see if there is a temporary file and you match the checksums of each file against the ones stored. That way we don't remove files that people have edited.

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

No branches or pull requests

1 participant