You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarify that network meta and network options are the same thing #322
Describe your use case and the problem you are facing
The wp network meta command is technically named correctly, but most developers know network meta as network options due to the (add|get|update|delete)_network_option() functions.
When you're trying to remember what command to use for network options WP-CLI isn't very helpful, especially for developers who don't know that network options are technically network meta.
Describe the solution you'd like
Clarify the description of the wp network meta command so it mentions network options
When a user types wp network option, show a suggestion for wp network meta (currently there's no suggestion)
@danielbachhuber I've tested out a patch that would work for suggesting wp network meta when you type wp network option but there's something about the approach I don't like.
It feels like putting this suggestion into the Runner feels too high-level for a very specific suggestion like this.
But I don't see a good pattern for suggesting this command in the entity repo.
I also don't like putting this mapping in the Utils\get_suggestion() $suggestion_map array because I don't want to globally recommend replacing option with meta. Only in the network command.
Any suggested approaches before I turn this into a PR?
@shawnhooper I think the Runner is the most appropriate place at this time. It's a one-off solution for a one-off idiosyncrasy. It will be safe to abstract further in the future if we need.
Activity
shawnhooper commentedon Nov 16, 2023
@danielbachhuber I've tested out a patch that would work for suggesting
wp network metawhen you typewp network optionbut there's something about the approach I don't like.See:
wp-cli/wp-cli@b6daeba
It feels like putting this suggestion into the Runner feels too high-level for a very specific suggestion like this.
But I don't see a good pattern for suggesting this command in the entity repo.
I also don't like putting this mapping in the Utils\get_suggestion()
$suggestion_maparray because I don't want to globally recommend replacingoptionwithmeta. Only in thenetworkcommand.Any suggested approaches before I turn this into a PR?
danielbachhuber commentedon Nov 19, 2023
@shawnhooper I think the Runner is the most appropriate place at this time. It's a one-off solution for a one-off idiosyncrasy. It will be safe to abstract further in the future if we need.
danielbachhuber commentedon Nov 21, 2023
🔨