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