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

Improve command line parsing utils to accept strings #249

Closed
chuggafan opened this issue Oct 12, 2018 · 5 comments
Closed

Improve command line parsing utils to accept strings #249

chuggafan opened this issue Oct 12, 2018 · 5 comments

Comments

@chuggafan
Copy link
Contributor

I think the title speaks for itself, it currently cannot handle strings as command line options when it really, really should and needs to if you want to have more than 13 (nonconfusing) unique commands.

@LADSoft
Copy link
Owner

LADSoft commented Oct 13, 2018

do you mean quoted strings? Or do you mean using something more verbose than the simple one-character switches that everything uses?

@chuggafan
Copy link
Contributor Author

More verbose than one character switches

@LADSoft
Copy link
Owner

LADSoft commented Jan 30, 2019

this is probably going to happen this weekend, in conjunction with setting up for #330. Probably what I'll do is just extend the current design to allow for more verbosity while leaving the original design intact; then as time goes by we can migrate to using more verbose switches. Probably designed in such a way that you can use either an existing one character switch or a more verbose version down the road... I'm thinking along the lines of what the other compilers do '--' followed by some name and then if there is a parameter separate with a space.

@GitMensch
Copy link
Contributor

Can I suggest to just drop the current command line parser and use (a possibly adjusted version of) getopt? The license is compatible now, it is "commonly used" and also provides the option to use an abbreviated form for the long option as long as it is still clear - and otherwise prompts the user "did you mean xyz?"

I guess it may need the same amount of time to replace the current parser with a well-debugged version than to rewrite and debug the current one...
For reference: the minimal adjusted one GnuCOBOL uses, along with an internal swap of starting / to - before getopt is called for WIN32 (which could be integrated into an adjusted getopt version directly...).

@LADSoft
Copy link
Owner

LADSoft commented Jan 30, 2019

I may look at doing that, let me mull on it a while :)

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

3 participants