Skip to content

Refactor optparsing #450

@jkarni

Description

@jkarni

Our Optparse module has become very complicated, and there are further improvements, such as:

  1. not failing because of syntax errors in garn.ts when things like --help are requested
  2. showing information about why a command is unavailable
  3. showing information about commands even if they're unavailable

That would be nice, but risk making the module worse. Some refactoring is in order.

One piece of functionality that I missed that I think make this possible are commandGroups. With this, I think we can just have a normal set of parsers, and based on the situation optionally set the commandGroup and, I think, infoOption/abortOption. That should pretty dramatically simplify the module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions