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

Short options with argument? #14

Open
Marclev78 opened this issue Oct 27, 2017 · 0 comments
Open

Short options with argument? #14

Marclev78 opened this issue Oct 27, 2017 · 0 comments

Comments

@Marclev78
Copy link

Best I can tell there is no way to specify that a short option should have an argument. I've tried the following:

This errors:

opts = getopt.create([
  ["d=ARG"]
}).parseSystem();

This is what I gather from the documentation:

opts = getopt.create([
  ["d", "="]
}).parseSystem();

This is literally copying the documentation:

opts = getopt.create([
  ["S", "="]
}).parseSystem();

With each of these it lets me pass in -d (or -S in the last one), but any attempts to specify -d=bla or -d bla get ignored and querying opts["d"] is undefined.

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

1 participant