Skip to content

traverse: collect context information about args #922

Open
@rsteube

Description

@rsteube

Request

Since traverse already iterates over the arguments and identifies them this should be stored and optionally returned.

Proposed solution

Provide an array of context information:

  • value of the arg
  • name of flag/subcommand
  • desctiption of flag/subcommand
  • type (flag type | argument type | command)
  • optarg (embed the same if it is an optarg)

Anything else?

gh issue --repo rsteube/carapace list --label enhancement --state open --web

Could be visualized like:

gh # GitHub CLI
issue # Manage issues
  --repo rsteube/carapace # Select another repository using the `[HOST/]OWNER/REPO` format
list #  List issues in a repository
  --label enhancement # Filter by label
  --state open # Filter by state: {open|closed|all}
  --web # List issues in the web browser

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions