ismaelgv / rnr

A command-line tool to batch rename files and directories
MIT License
476 stars 15 forks source link

[Feature] Custom dump file base name #43

Open 9999years opened 2 months ago

9999years commented 2 months ago

Hello! rnr is an excellent tool and I'm very grateful to you for making it!

When I run rnr a file like rnr-2024-08-09_101725.json is created in the current directory. This is nice (being able to undo my changes is great!) but a little bit annoying, because Git immediately shows an untracked file I have to be careful to not commit.

In my global gitignore file, I ignore all files that start with xxx so that I can write temporary notes and scratch output to files with names like xxx-notes.md or xxx-ghc-output.txt and not worry about committing them. I would like to instruct rnr to write its dump file with a name like this (e.g. xxx-rnr-2024-08-09_101725.json) to save me the hassle.

Does this make sense? I'm not sure when, but I could probably write an implementation if this sounds like a good idea to you.

ismaelgv commented 2 months ago

It seems reasonable, I usually add an entry to my .gitignore files too (rnr-*.json).

I will take a look to make this prefix configurable.

9999years commented 2 months ago

I might also take a shot at writing this if I can find time, I just wanted to make sure you agreed first :)

ismaelgv commented 2 months ago

I will join both features and refactor part the CLI and config parser.