case-app
case-app copied to clipboard
Add an optional prefix for Recurse
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 This looks neat! Feel free to keep working on that…
Should be ok to review.
I'm passing around an empty Recurse
instead of an Option[Recurse]
. Eh. Might change that.
Howdy! Any further changes required before merge?
Seems this slipped my attention, having a look again…
(this is my actual account) Let me know if you want me to update this. I have some time this week.