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

Allow '.' as Separator in Options and Arguments #54

Closed
tgockel opened this issue May 7, 2018 · 2 comments
Closed

Allow '.' as Separator in Options and Arguments #54

tgockel opened this issue May 7, 2018 · 2 comments

Comments

@tgockel
Copy link
Contributor

tgockel commented May 7, 2018

The paradigm used for "advanced" options at my company uses namespace-qualified option names on the command line. A la:

java -jar my-program.jar --com.foo.bar=100 --com.foo.baz=taco

Specifying these as options will always throw IllegalArgumentException, as this does not pass the OPTION_NAME_RE pattern in ArgParser.kt. Is there any reason to prevent using '.' as part of an option or argument (sibling to the '_' and '-' characters)?

tgockel added a commit to tgockel/kotlin-argparser that referenced this issue May 7, 2018
@tgockel
Copy link
Contributor Author

tgockel commented May 7, 2018

Also made a PR because the fix seems super easy. Not sure if disallowing '.' characters was intentional or just not done.

@xenomachina
Copy link
Owner

I was reserving the dot for a future feature I've been planning, but after thinking on it, I believe it should be fine to allow it in the way your PR enables.

Thanks for the suggestion, and the PR!

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

No branches or pull requests

2 participants