Earlier quoted context omitted.
>I'd rather talk about how file names with spaces in them break things Not really a Unix thing, but some tools (rather common even) are indeed very broken when it comes to certain types of file names. However... >how hard it is do delete a file named "-" While it's certainly a corner case of sorts, if you call that task hard, I wonder how you fare with using more complex software, like a web browser...
> I wonder how you fare with using more complex software, like a web browser... That snark isn’t necessary. It’s easier to use a web browser than to delete a file called - from the terminal. Or haven’t you used a non-GUI system before?
Everything has a learning curve, of course, but are you sure you're just not much more familiar with one of these two?
(edit: just to clarify, what do you expect a decent rm to do when given a single argument of “-”? While there may still be systems where that does not do what you'd expect it to do – it's no different to existing obsolete versions of browsers that do nothing at all when you type in something other than a valid URL in the address bar – and are thus considerably harder to use for some not familiar with the technology. The harder corner case would be to try and remove a file with name that can be confused for a valid flag – like '-i' – but even then, that's about the only corner case for the tool, and not a steep step to learn. Any recent coreutils rm will even suggest a valid command to remove files that look like options, but are not actually valid options, so some thought has been given to discoverability as well.)