Skip to content

List all command's arguments using Helper #1823

@grallm

Description

@grallm

I want to list all the arguments (or sub-commands, not sure of the difference) of my command.

If I look the property _args, I can confirm my command has an argument:

[
  {
    "description": "",
    "variadic": false,
    "required": false,
    "_name": "commands"
  }
]
Screenshot of the Argument object image

To not use a private property, I try to access this argument with the Help class and the visibleArguments method (see the code)

The problem, I do not have any description for my argument and the implementation of visibleArguments requires one.

Is this a problem? If not, can someone explain it to me? Is there any other clean way?

Thank you! 😁

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions