Alhadis/GetOptions

Bundling multiple short-options is fucked

Alhadis opened this issue · 1 comments

I'll let code explain this one:

/** Read CLI args */
let _ = getOpts(process.argv.slice(2), {
    "-m, --mutilate":        "<bool>",
    "-u, --underline-urls":  "<bool>",
    "-i, --indent":          "<string>",
    "-c, --colour, --colours, --colourise": "<bool>"
});
./index.js -c0 -u0

-u0 gets treated as an element of .argv, yet -u 0 doesn't.

This just in, also fucked: --width=320 --config=/some/file/or/some/shit.