Skip to content

Adding options after commands have been created #1631

Closed
@mikemilano

Description

@mikemilano

Is there a way to add options to commands after they have been created?

In this app, I'm separating commands into their own files and dynamically requiring them. I'd like to go back through and add global options to each of the commands that exists. Is this possible?

I've tried simply appending the options array of each command with a new Option but the option doesn't show when I run help on the command.

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