logoalt Hacker News

xigoiyesterday at 11:59 AM3 repliesview on HN

Would you enjoy writing `rm --yolo file` instead of `rm file` every time?


Replies

vladvasiliuyesterday at 3:35 PM

No, 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.

phcreeryyesterday at 1:51 PM

In 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.

show 1 reply
user3939382yesterday at 12:19 PM

Not 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.