On 9/2/19 10:03 AM, Sami Kerola wrote:
[...] I don't see any problem adding --interactive long
only option.
a) Bloat:
Apart from the --parents option, rmdir(1) is just a simple
wrapper around rmdir(2).
Just recently I've been asked (off-list) why src/true.c needs
to have 80+ lines while 3 lines would be enough.
b) Alternatives:
The case is trivial enough to have some little prompt wrapper around
it.
E.g. a bit contrived but works:
$ xargs -p rmdir DIR </dev/null
rmdir DIR ?...y
c) As Kaz already wrote: it's easy enough to re-create an empty
directory
which has been deleted accidentally.
d) My personal opinion: I'm not in favor of those "do you really want
to XYZ?"
questions - especially in the case one just explicitly told the tool
exactly
to "do XYZ". Similarly, one could argument why not to add it to sleep,
kill, cat, and so on.
Have a nice day,
Berny