Skip to content

Short options with argument? #14

Description

@Marclev78

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions