node-getopt icon indicating copy to clipboard operation
node-getopt copied to clipboard

Short options with argument?

Open Marclev78 opened this issue 8 years ago • 0 comments

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.

Marclev78 avatar Oct 27 '17 10:10 Marclev78