Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an optional prefix for Recurse #483

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

corey-at-protenus
Copy link

@corey-at-protenus corey-at-protenus commented Jun 14, 2023

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

only Scala 3 for now.
@alexarchambault
Copy link
Owner

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

@corey-at-protenus corey-at-protenus changed the title Draft: add an optional prefix for Recurse Add an optional prefix for Recurse Jun 28, 2023
@corey-at-protenus
Copy link
Author

Should be ok to review.

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

@corey-at-protenus
Copy link
Author

Howdy! Any further changes required before merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants