Skip to content

Add some more suggestions for mis-typed arguments#4577

Merged
schlessera merged 1 commit intowp-cli:masterfrom
johnbillion:more-suggestions
Jan 23, 2018
Merged

Add some more suggestions for mis-typed arguments#4577
schlessera merged 1 commit intowp-cli:masterfrom
johnbillion:more-suggestions

Conversation

@johnbillion
Copy link
Contributor

Previously: #4392.

function get_suggestion( $target, array $options, $threshold = 2 ) {

$suggestion_map = array(
'add' => 'create',
Copy link
Member

Choose a reason for hiding this comment

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

With suggestions like this one (and the 'trash' => 'delete' one as well), we should first make sure that only valid options are presented as suggestions (see #4578).

There's some overlap for these terms across the different commands, so we want to make sure they are only shown when they are actually relevant.

Also, once #4578 got in, we would probably want to provide these options in both directions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good points

Copy link
Member

Choose a reason for hiding this comment

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

@johnbillion #4578 was now fixed.

Could you pull in latest master, and add the two suggestions that might make sense in both directions in swapped direction as well?

Copy link
Member

Choose a reason for hiding this comment

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

I cannot push to this branch, I'll merge and then create an additional PR instead.

@schlessera schlessera added this to the 1.5.0 milestone Dec 28, 2017
@schlessera schlessera merged commit 3bf03f9 into wp-cli:master Jan 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants