Remix.run Logo
sudahtigabulan 3 days ago

I think I've seen it done like that

  --option flag1,flag2
(Maybe with another separator, as long as it doesn't need to be escaped.)

Another possibility is to make the main option an argument, like the subcommands in git, systemctl, and others:

  command option --flag1 --flag2
This depends on the specifics, though.
dwattttt 3 days ago | parent [-]

> --option flag1,flag2

Embedding a second parse step that the first parser doesn't deal with is done, but it's a rough compromise.

It feels like the difficulty in dealing with

  [--option [--flag1 --flag2]]

Is more to do with its expression in the language parsed to, than CLI elegance.