Closed ezrafree closed 3 years ago
You need to document the flag in the readme.
For example, in this PR I'm printing the filename to the console before it actually tries to delete the file, which is obviously not ideal.
What does rm
do? Does it print before or after deleting the file?
Bump
This PR attempts to add support for verbose flags.
For example, suppose I've aliased
rm
totrash
and I run the commandrm -rfv <directory>
. As a user, my expectation would be that the deleted filenames would be printed to the console.I'm not a Swift developer by trade, so I'd be interested in learning more if anyone knows of a better way to check for the
-v
flag without having to use multiple switch cases, perhaps with a regex that checks if the string begins with a dash and contains a "v".I would also be interested in knowing if there's a better way to implement this in general. For example, in this PR I'm printing the filename to the console before it actually tries to delete the file, which is obviously not ideal. It doesn't look like there are any other options that can be passed to
FileManager.default.trashItem()
.FIxes #13