4 ms·
Would you enjoy writing `rm --yolo file` instead of `rm file` every time?
by xigoi 8mo ago
Would you enjoy writing `rm --yolo file` instead of `rm file` every time?
- user3939382 8mo agoNot taking a position but the design of rm strengthens the position that recursive by default without flags isn’t ok. rm makes you confirm when you want changes to recurse dirs.
- phcreery 8mo agoIn this case, "file" is the arg, not --yolo. `rm` without any args returns `` rm: missing operand Try 'rm --help' for more information. ``` `oxfmt` should have done the same and `oxfmt .`, with the desired dir ".", should have been the required usage.
- xigoi 8mo agoI expect invoking a command-line tool without any arguments to perform the most common action. Displaying the help should only be a fallback if there is no most common action. For example, `git init` modifies the current directory instead of asking you, because that’s what you want to do most of the time.
- vladvasiliu 8mo agoNo, but we're not talking about `oxfmt file` here, but `oxfmt` with no argument. I don't expect `rm` with no argument to trash everything in my CWD. Which it doesn't, see sibling's comment.
- watt 8mo agowould you enjoy it if running "rm" in any folder recursively deleted all files in it?