New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wp jetpack has an invalid synopsis #1441

Closed
guigo2k opened this Issue Oct 7, 2014 · 11 comments

Comments

5 participants
@guigo2k

guigo2k commented Oct 7, 2014

[root@server wp]# wp jetpack module
Warning: The wp jetpack module command has an invalid synopsis part: [<module_name>]]

[root@server wp]# wp jetpack module activate sso
Warning: The wp jetpack module command has an invalid synopsis part: [<module_name>]]
Error: Too many positional arguments: activate sso

@szepeviktor

This comment has been minimized.

Contributor

szepeviktor commented Oct 8, 2014

@szepeviktor

This comment has been minimized.

Contributor

szepeviktor commented Oct 8, 2014

It is very easy to correct this problem.
https://github.com/wp-cli/wp-cli/wiki/Commands-Cookbook#synopsis

@danielbachhuber

This comment has been minimized.

Member

danielbachhuber commented Oct 8, 2014

It is very easy to correct this problem

Why not submit a pull request?

@szepeviktor

This comment has been minimized.

Contributor

szepeviktor commented Oct 8, 2014

Do you mean it is a problem in wp-cli??

@danielbachhuber

This comment has been minimized.

Member

danielbachhuber commented Oct 8, 2014

Er, submit a pull request to Jetpack if it's an easy fix.

@scribu

This comment has been minimized.

Member

scribu commented Oct 8, 2014

Actually, the correct repo for submitting a pull request to would be https://github.com/automattic/jetpack

@szepeviktor

This comment has been minimized.

Contributor

szepeviktor commented Oct 8, 2014

I was wrong, it is not easy.
Synopsis parser cannot handle even [<sub_subcommand> [<module_name>]] (optional-in-optional).
Nor this [list|activate]

@danielbachhuber Could you reopen it and tag is as a confirmed bug or feature request. I haven't seen this complex synopsis in wp-cli.

@szepeviktor

This comment has been minimized.

Contributor

szepeviktor commented Oct 8, 2014

Jetpack uses sub-subcommands.

@scribu

This comment has been minimized.

Member

scribu commented Oct 8, 2014

Jetpack should use actual sub-subcommands, i.e. have a separate Jetpack_Module_Command class that gets registered as WP_CLI::add_command( 'jetpack module', 'Jetpack_Module_Command' ).

@georgestephanis

This comment has been minimized.

georgestephanis commented Oct 10, 2014

When I built it out last summer, that sort of subcommand support wasn't supported -- I believe there was an open pull request that had been idling for quite a while. As it sounds from above that it is now supported, I'll look at getting it in.

Thanks for the ping!

@szepeviktor

This comment has been minimized.

Contributor

szepeviktor commented Oct 10, 2014

I think Jetpack CLI will get more structure by this modification.

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