Skip to content

Unable to use wp site list to filter sites by path #285

Closed

Description

@dd32

Bug Report

The wp site list command supports filtering to specific fields, such as domain:
wp site list --domain=wordpress.org
and the documentation suggests it can filter to the path, but the parameter conflicts with the global --path parameter.

The code seems to suggest it's possible too:
https://github.com/wp-cli/entity-command/blob/master/src/Site_Command.php#L558-L563

It should be possible to list sites by their path component somehow, eg: wp site list --field-path=/support/

Let us know what environment you are running this on

OS:	Linux 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64
PHP version:	7.2.28
WP-CLI version:	2.4.0

Activity

  1. added
    command:site-list
    on Mar 20, 2020
  2. ocean90 commented on May 12, 2020

    @ocean90
    Contributor

    @dd32 It should work with the WP_CLI_STRICT_ARGS_MODE=1 flag.

    Related: 0ab8115

  3. dd32 commented on May 12, 2020

    @dd32
    Author

    Thanks @ocean90! I still feel this is a bug and there should at least be a prefixed variant of the args if strict mode is never going to be enforced.

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

Metadata

Metadata

Labels

command:site-list

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions