Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Repeating parameterised options #16

Closed
rgrannell1 opened this issue Apr 17, 2016 · 3 comments
Closed

Repeating parameterised options #16

rgrannell1 opened this issue Apr 17, 2016 · 3 comments

Comments

@rgrannell1
Copy link
Contributor

Hello,

I'm really glad to see that docopt.coffee has a competitor (written in Purescript!), as docopt.coffee is a little buggy, difficult to debug, and unmaintained.

Will neodoc support repeating parameterised options (docopt.coffee doesn't properly support them)?

I'm looking forward to porting from docopt to neodoc 👍

felixSchl added a commit that referenced this issue Apr 17, 2016
@felixSchl
Copy link
Owner

Hey, see the commit above, I have added tests which all pass in neodoc. Do they match your expectations?

felixSchl added a commit that referenced this issue Apr 17, 2016
@rgrannell1
Copy link
Contributor Author

Thanks for testing that corner-case; the expected output looks good :)

felixSchl added a commit that referenced this issue Apr 18, 2016
felixSchl added a commit that referenced this issue Apr 18, 2016
@felixSchl
Copy link
Owner

Hey, over the last days it became apparent to me that the comma notation (-f 123,123) is too specific and won't hold up, I think. What about space separated values or colon separated, or semicolon... Also what if the value you pass happens to have a unintentional comma in it. I consider this a big flaw and will remove it and treat these values as regular strings in coming releases. Maybe we can add a tag to the description sections that triggers this style of parsing? I could imagine it be more flexible to have the providing program perform the expansion in such cases, e.g. bash: -f{123,123,123}.

felixSchl added a commit that referenced this issue Apr 26, 2016
Ensure comma separated values provided on the command line or through
the environment are *NOT* parsed into arrays. This has been identified
as flaw in design an is subject to removal from neodoc. This change
excludes default value declarations ([default: a,b,c]) since it's in the
developers control and comma-parsing can be skipped by quoting
([default: 'a,b,c']). This changeset further brings in a fix for the
Value module's read function.

Refer #16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants