Skip to content

Allow filtering languages by multiple statuses#162

Merged
swissspidy merged 5 commits intowp-cli:mainfrom
michaelw85:96_filter_multiple_values
Jan 7, 2025
Merged

Allow filtering languages by multiple statuses#162
swissspidy merged 5 commits intowp-cli:mainfrom
michaelw85:96_filter_multiple_values

Conversation

@michaelw85
Copy link
Contributor

@michaelw85 michaelw85 commented Jan 7, 2025

Makes it possible to filter using multiple statuses.

Example: wp language core list --status=active,installed

Implementation is based on this comment and code example

Fixes #96

@michaelw85 michaelw85 requested a review from a team as a code owner January 7, 2025 08:07
@swissspidy swissspidy changed the title #96 filter using multiple comma separated values Allow filtering languages by multiple statuses Jan 7, 2025
@swissspidy
Copy link
Member

Thanks a lot for your contribution! This looks great already.

Question: can we also add this for wp language plugin and wp language theme so we have full parity across all language sub-commands?

@michaelw85
Copy link
Contributor Author

Thanks a lot for your contribution! This looks great already.

Question: can we also add this for wp language plugin and wp language theme so we have full parity across all language sub-commands?

Do you want the update in this PR or could this be split into separate tickets?

@swissspidy
Copy link
Member

I think it's easier if it's all in the same ticket & PR. It shouldn't require big changes, but let me know if you need help

@swissspidy swissspidy added command:language-core-list Related to 'language core list' command command:language-plugin-list Related to 'language plugin list' command command:language-theme-list Related to 'language theme list' command labels Jan 7, 2025
@swissspidy swissspidy added this to the 2.0.23 milestone Jan 7, 2025
@michaelw85
Copy link
Contributor Author

I think it's easier if it's all in the same ticket & PR. It shouldn't require big changes, but let me know if you need help

Ok, I will update this PR asap. This is my first contribution but I think I should be fine, otherwise, I will ask in the cli channel.

@michaelw85
Copy link
Contributor Author

@swissspidy I've updated the PR to add support to the other commands + added tests.

I don't like the copy/pasted logic, but I don't want to refactor this on my first-ever contribution 😂
Seeing this is also in different repo's, it would be good to centralize logic like this.

Copy link
Member

@swissspidy swissspidy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@swissspidy swissspidy merged commit e3d89d9 into wp-cli:main Jan 7, 2025
37 checks passed
@michaelw85 michaelw85 deleted the 96_filter_multiple_values branch January 7, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:language-core-list Related to 'language core list' command command:language-plugin-list Related to 'language plugin list' command command:language-theme-list Related to 'language theme list' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include documentation - list all installed languages including active

3 participants