Hacker News new | ask | show | jobs
by jraph 852 days ago
Hi :-)

This is a problem worth tackling. It's too easy to remove stuff inadvertently without easy ways to recover.

I scanned your README, here are my hot takes:

- rm is still far simpler to use, and so will be used by virtue of laziness and habits instead of your tool. You want to fight back and come up with a solution against this very hard.

- delete vs remove is going to be a nightmare. Which one is for going to trash, and which one is to irremediably removing the file? I don't know why English even has the two words, and each tool uses one or the other without a clear pattern (though English is not my first language). Maybe "wrm trash" should trash the file, and "wrm remove" should remove them irremediably, like rm ("remove") does. "delete" could be an alias of "remove".

- irremediably removing the file should be harder to do and trashing them. So maybe "trash" should be the default behavior. If no option is given to "wrm", that's what will happen. "wrm" is still longer than "rm", but that's way less annoying than typing "wrm remove"

Maybe the answer is an alias, or even (god forbid) a shadowing of the rm command in interactive shell sessions, but you might be get hatred for this because people might not like this, at least if it's done without them agreeing. There could be a setup phase that invites people to setup the shadowing in their shell rc file.

Good luck and have fun with your project!

2 comments

Thank you for your comment. In v0.1.*, I used options instead of subcommands. Should I switch back to options?
There's no absolute truth. Sub commands are neat, options have less chance to clash with existing filenames but are more annoying to write. In any case you can handle `--` to stop the parameters and begin to handle anything that follows as filenames.

If you guide the user to setup nice aliases, this should not matter too much.

Perhaps replace `delete` with `destroy`. To me, that feels more deliberate, but again I spend a lot of time using terraform so maybe it's just me.
I would add an example on how to alias "rm" to your tool so that I don't need to remember to use your tool yet I stay safe.

Whenever I type "rm file" it should be redirected to your tool with the trash option.