nomnom icon indicating copy to clipboard operation
nomnom copied to clipboard

No way to indicate end of flags and start of arguments

Open itay opened this issue 14 years ago • 0 comments

Imagine I have a definition that allows for some flags and then two positional arguments (named command and myargs), the second of which is a list, then, I invoke it as follows:

node.js foo.js --arg1=123 --arg2=456 blahblah --bar=bar --baz=baz 

According to the definition, I'd imagine that options.command is equal to blahblah and options.myargs is equal to ["--bar=bar", "--baz=baz"].

However, nomnom seems to to take both --bar and --baz as flags to the original command line, so instead I have things like options.bar: bar and options.baz: baz.

I could not find a way to get nomnom to treat them as arguments. I've seen this done on *nix systems with -- (implying that anything following is part of the positional parameters, not part of the flags), or simply treating anything after the positional arguments start as positional as well.

I realize this might be a corner case, but I thought I'd at least report it.

itay avatar Jun 16 '11 18:06 itay