Well, the problem there is that Linux has rm aliased to 'rm -i',
Oh, that. See, that could as easily have been my own setup (and has been, in the past, until I got so used to reflexively hitting 'y' after typing 'rm' that it became useless). It doesn't address the basic issue of doing a stat() call to determine that it's a directory, asking you if you want to remove it, and then telling you it can't unlink it because it's a directory. if ( not recursive && directory ) { go directly to error message, skipping prompt } isn't exactly hard to code. I mean, if I do rm -i foo when foo doesn't exist, it goes straight to the error message without first asking me if I want to delete the nonexistent file.
I consider this dead horse to be well and truly flogged at this point.
no subject
Oh, that. See, that could as easily have been my own setup (and has been, in the past, until I got so used to reflexively hitting 'y' after typing 'rm' that it became useless). It doesn't address the basic issue of doing a stat() call to determine that it's a directory, asking you if you want to remove it, and then telling you it can't unlink it because it's a directory. if ( not recursive && directory ) { go directly to error message, skipping prompt } isn't exactly hard to code. I mean, if I do rm -i foo when foo doesn't exist, it goes straight to the error message without first asking me if I want to delete the nonexistent file.
I consider this dead horse to be well and truly flogged at this point.