Stream: ideas

Topic: roc fmt over roc format


view this post on Zulip Richard Feldman (Aug 07 2025 at 16:11):

in the CLI we've always called it roc format

I think we should probably change to roc fmt

view this post on Zulip Richard Feldman (Aug 07 2025 at 16:11):

thoughts?

view this post on Zulip Tobias Steckenborn (Aug 07 2025 at 18:47):

I'm really no fan of all the abbreviations. Just more stuff to keep in mind especially when tab completions (or for formatting likely wanted on save) is a thing. But that's the usual discussion between conciseness versus clarity / readability.

view this post on Zulip Richard Feldman (Aug 07 2025 at 18:52):

that's fair, but it's also true that we already embrace them in general :smile:

view this post on Zulip Tobias Steckenborn (Aug 07 2025 at 18:58):

So eventually also roc chk, roc bld and the like?

view this post on Zulip Brendan Hansknecht (Aug 07 2025 at 19:02):

We could always accept both

view this post on Zulip Anthony Bullard (Aug 08 2025 at 01:58):

I think CLIs don't take advantage of aliases enough

view this post on Zulip Brendan Hansknecht (Aug 08 2025 at 02:25):

Totally agree. I love that I jj it has one letter short forms for everything. jj b c for jj bookmark create

view this post on Zulip Brendan Hansknecht (Aug 08 2025 at 02:25):

Obviously rocs commands don't get some long in name as a source control program, but still relevant.

view this post on Zulip Luke Boswell (Aug 08 2025 at 05:14):

I don't like the shorthand versions. I much prefer the full word, format build check etc

view this post on Zulip Luke Boswell (Aug 08 2025 at 05:15):

I think it's friendlier for people who aren't already familiar with the tools. The first time you see fmt you might think what is "f.m.t"? or bld "b.l.d"?

view this post on Zulip Brendan Hansknecht (Aug 08 2025 at 05:37):

That's why I prefer both. Fast for people who know. Long for people who are new/don't know/don't want to remember

view this post on Zulip Brendan Hansknecht (Aug 08 2025 at 05:38):

Like I see we reason we can't accept all of roc format, roc fmt and roc f.

view this post on Zulip Luke Boswell (Aug 08 2025 at 05:58):

The reason I don't think we should (by default) is that all the tutorials and guides etc around will be fractured with different ways of doing the same thing which I think can be confusing.

view this post on Zulip Luke Boswell (Aug 08 2025 at 05:58):

It's not something I feel really strongly about, but I definitely prefer keeping it simple.

view this post on Zulip Brendan Hansknecht (Aug 08 2025 at 06:12):

That's fair. I would assume anything trying to teach would use the long form, but it isn't guaranteed

view this post on Zulip Kiryl Dziamura (Aug 08 2025 at 06:58):

Good point but I think the level of tutorial would assume the level of the reader. Like, roc format for beginners and roc fmt for advanced users.
However anyone can define aliases for their shell, and probably single roc format is good for ubiquitous consistency and clarity

view this post on Zulip Brendan Hansknecht (Aug 08 2025 at 07:11):

I don't think shells allow multi-word aliases. It also, just isn't as convenient and can't be used in scripts.

view this post on Zulip Tobias Steckenborn (Aug 08 2025 at 07:56):

Kiryl Dziamura schrieb:

Good point but I think the level of tutorial would assume the level of the reader. Like, roc format for beginners and roc fmt for advanced users.
However anyone can define aliases for their shell, and probably single roc format is good for ubiquitous consistency and clarity

I think this would be even more dangerous. You imply advanced users use fmt. Now if one fancies himself advanced, yet works in a team, you've got colliding worlds. As much as I appreciate conciseness, I've seen more harm being done by abbreviations then good. More in a business / domain context, but as soon as you've got new joiners not deep in the domain or not in the context and you've got abbreviations everywhere it's a real pain as people misunderstand and usually don't query if they think they know what it's for.

Yet here also not feeling that strong. I'd personally anyways see most people not running this in CLI. I'd assume most users would at one point rely on the IDE to format on save.

view this post on Zulip Sky Rose (Aug 08 2025 at 12:51):

This seems analogous to the common thing commands do with flags, where they have command --full-name-of-flag or command -f.

view this post on Zulip Sky Rose (Aug 08 2025 at 12:52):

That would point toward us allowing format and f (but not fmt) so we have one obviously canonical name and one that's obviously only an abbreviation for the command line

view this post on Zulip Brendan Hansknecht (Aug 08 2025 at 15:03):

Of note, I don't think this should every really cause meaningful problems. All the short and long forms should be explained by roc --help

view this post on Zulip Brendan Hansknecht (Aug 08 2025 at 15:04):

So if someone see one and doesn't know what it means, they can just type in one command and learn exactly want it does

view this post on Zulip Brendan Hansknecht (Aug 08 2025 at 15:04):

Totally agree that it is basically equivalent to short and long forms of flags.

view this post on Zulip Richard Feldman (Aug 11 2025 at 19:16):

I think the topic of whether we should allow single-letter aliases (e.g. f versus writing it out) is decoupled from this

view this post on Zulip Richard Feldman (Aug 11 2025 at 19:17):

I've never heard of beginners being confused about what fmt does and then the "aha" moment being that it was expanded to "format" :sweat_smile:

view this post on Zulip Richard Feldman (Aug 11 2025 at 19:18):

seems like the experiment that Go, Rust, and Zig have done has revealed that fmt is totally fine in practice, whereas nobody has tried bld or chk as far as I know

view this post on Zulip Richard Feldman (Aug 11 2025 at 19:19):

and I'm not advocating for any others - this is mostly about having used cargo fmt and zig fmt and feeling like ours is longer unnecessarily :smile:

view this post on Zulip Richard Feldman (Aug 11 2025 at 19:19):

it's like we've deviated from both the original and the most established name in order to make it more verbose

view this post on Zulip Kiryl Dziamura (Aug 11 2025 at 19:20):

I mean, we're not talking about fmt exclusively. For me, "format" looks much more alien than "fmt", I used to call :fmt in helix and would never even think about typing :format.

view this post on Zulip Kiryl Dziamura (Aug 11 2025 at 19:21):

But would it become a rule for other cases?

view this post on Zulip Richard Feldman (Aug 11 2025 at 19:21):

I want to scope this thread to literally the following:

view this post on Zulip Richard Feldman (Aug 11 2025 at 19:22):

happy to talk about shorthands, other commands, etc. in other threads, but I believe this is a decision we can make in isolation because there's plenty of precedent for doing so

view this post on Zulip Richard Feldman (Aug 11 2025 at 19:22):

e.g. it's cargo check, cargo build, cargo fmt and cargo doesn't have single-letter abbreviations

view this post on Zulip Richard Feldman (Aug 11 2025 at 19:22):

same with Zig

view this post on Zulip Richard Feldman (Aug 11 2025 at 19:23):

we don't need to couple this decision to the design of other commands

view this post on Zulip Kiryl Dziamura (Aug 11 2025 at 19:24):

I personally trust fmt more than format. For me the second is associated with format drive lol

view this post on Zulip Anton (Aug 12 2025 at 06:52):

I'd like to support both. Flags and subcommands are easy to forget so I always appreciate some flexibility.

view this post on Zulip Sky (Aug 13 2025 at 01:36):

I also side with fmt because less to type and I see it in other places too.

view this post on Zulip Ian McLerran (Sep 19 2025 at 20:38):

I like fmt. It has precident, and the less I need to type when working in the terminal, the faster I can be.


Last updated: Jun 16 2026 at 16:19 UTC