← Back to context

Comment by Sammi

11 hours ago

I expect a file formatter to format the files when I call it. Anything else would be surprising to me.

a new user should not expected to know whether to use "--info", "--help", or "-info" or "/info"

A power user can just pass the right params. Besides, it is not that hard to support "--yolo" parameter for that use case

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

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

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

      1 reply →

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

  • I know feels aren't the objective truth but I feel like most people would default to running "new-cli-tool --help" first thing as a learned (defensive) habit. After all quite a bit of stuff that runs in a terminal emulator does something when ran without arguments or flags.