News for hackers. Stuff that matters.
Re:The JavaScript Oxidation Compiler by Sammi on Monday February 23, 2026 @05:40AM (#47120529)
This is user error. oxfmt did what you asked it to do.
Re:The JavaScript Oxidation Compiler by rk06 on Monday February 23, 2026 @06:10AM (#47120746)
I don't think so. If someone runs a tool without args, the tool should do equivalent of "tool --help"

It is bad ux.

Re:The JavaScript Oxidation Compiler by Sammi on Monday February 23, 2026 @06:26AM (#47120879)
I expect a file formatter to format the files when I call it. Anything else would be surprising to me.
Re:The JavaScript Oxidation Compiler by rk06 on Monday February 23, 2026 @06:39AM (#47120991)
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

Re:The JavaScript Oxidation Compiler by xigoi on Monday February 23, 2026 @06:59AM (#47121185)
Would you enjoy writing `rm --yolo file` instead of `rm file` every time?
Re:The JavaScript Oxidation Compiler by user3939382 on Monday February 23, 2026 @07:19AM (#47121351)
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.
Re:The JavaScript Oxidation Compiler by phcreery on Monday February 23, 2026 @08:51AM (#47122314)
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.

Re:The JavaScript Oxidation Compiler by xigoi on Monday February 23, 2026 @03:48PM (#47128572)
I 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.
Re:The JavaScript Oxidation Compiler by vladvasiliu on Monday February 23, 2026 @10:35AM (#47123669)
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.

Re:The JavaScript Oxidation Compiler by watt on Wednesday February 25, 2026 @01:56AM (#47148239)
would you enjoy it if running "rm" in any folder recursively deleted all files in it?
Re:The JavaScript Oxidation Compiler by aquariusDue on Monday February 23, 2026 @12:02PM (#47125069)
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.
Re:The JavaScript Oxidation Compiler by rk06 on Monday February 23, 2026 @11:35PM (#47132906)
I feel most people should refer to manual before running arbitary command. but that's because "crontab -r" has taught me this the hard way.

I do not feel that new devs should not learn these things the hard way