Skip to content

Design does not make it possible to process ordered flags #59

Open
@KernelDeimos

Description

Many POSIX coreutils have ordered flags. For example the ls command is able to perform multiple sorts, and the order of these sorts is determined by what order to provide the flags in.

I'm not sure whether or not this will be considered out of scope for minimist, but I think it's worth pointing out and discussing because this module is used by popular packages like vorpal and has potentially had a lot of influence on how CLI argument processing is done across node.js packages.

The function would need to return an array instead of an object for this to work, so it would have to be an opt-in in the options object. I'm going to implement this either way so if I get the green light on this issue I'll contribute it here.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions