SUPERCILEX / fuc

Modern, performance focused unix commands
Apache License 2.0
340 stars 8 forks source link

add option to rename top directory before recursive delete #33

Closed andreasstieger closed 7 months ago

andreasstieger commented 7 months ago

Let's assume that a somewhat frequent usage of rmz is to recursively delete a tree and putting another tree in it's place. During the recursive operation, however fast, the original directory entry name remains blocked for use. The perceived speed of rmz could be improved by adding an option (--rename-before-deletion) to rename the target directory to a non-conflicting, temporary name (.rmz-deletion-$PID-$XXXX). For a single interactive shell this only makes sense when rmz is run in the background.

SUPERCILEX commented 7 months ago

This sounds useful, but I can't decide if it's a good idea to put in rmz itself. My question is why not simply type out the mv command yourself? And if it were implemented in rmz, why not always do the move?

andreasstieger commented 7 months ago

I think it's usability sugar, not the core goal of the project. Couple of lines in shell script to wrap for repeated use, so no a big deal. Thanks for considering.

SUPERCILEX commented 7 months ago

usability sugar, not the core goal of the project

Thanks for understanding. :) To be clear, I could be convinced that sugar is useful, but like you said it's not a core goal so my instinct is to try and avoid extra complexity.