Skip to content

Show disabled commands with the reason why they were disabled #4035

Closed

Description

@schlessera

The hooks from #3835 are now in, and a simple type of dependency resolution should now work.

However, I'd like to look further into providing feedback like in this mockup about why a command might not be available:

commands-dependency-mockup

The before_add_command:<command> hook passes a WP_CLI\Dispatcher\CommandAddition object to the callback, which has an abort( $reason ) method.

I'm thinking about adding a new command object for this, something like WP_CLI\Dispatcher\DisabledCommand. When preparing the help screen, we can then still cycle over all commands, but provide different output for the disabled ones. They should also not be available to be actually run.

What do you think?

Activity

  1. danielbachhuber commented on Dec 14, 2017

    @danielbachhuber
    Member

    Closing in favor of #6244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions