case-app icon indicating copy to clipboard operation
case-app copied to clipboard

Add an optional prefix for Recurse

Open corey-at-protenus opened this issue 1 year ago • 3 comments

Only implemented Scala 3. Once confirmed this is the appropriate direction I'll implement for Scala 2.

Looks like:

final case class FewArgs(
  value: String = "default",
  numFoo: Int = -10
)

final case class RecurseWithPrefix(
  noPrefix: Int,
  @Recurse("prefix") withPrefix: FewArgs
)

Will result in the options --no-prefix, --prefix-value and --prefix-num-foo.

Had a hard time figuring out where to modify the name formatter to do this. I thought I'd be able to update the Recurse parsers default name formatter but no luck. See #86

corey-at-protenus avatar Jun 14 '23 20:06 corey-at-protenus

@corey-at-protenus This looks neat! Feel free to keep working on that…

alexarchambault avatar Jun 19 '23 13:06 alexarchambault

Should be ok to review.

I'm passing around an empty Recurse instead of an Option[Recurse]. Eh. Might change that.

corey-at-protenus avatar Jun 28 '23 14:06 corey-at-protenus

Howdy! Any further changes required before merge?

corey-at-protenus avatar Aug 14 '23 18:08 corey-at-protenus

Seems this slipped my attention, having a look again…

alexarchambault avatar Jun 05 '24 15:06 alexarchambault

(this is my actual account) Let me know if you want me to update this. I have some time this week.

coreyoconnor avatar Jun 05 '24 16:06 coreyoconnor