Skip to content

Add plugins help#263

Merged
erikzhang merged 4 commits intoneo-project:masterfrom
belane:plugins-help
Nov 16, 2018
Merged

Add plugins help#263
erikzhang merged 4 commits intoneo-project:masterfrom
belane:plugins-help

Conversation

@belane
Copy link
Copy Markdown
Member

@belane belane commented Nov 14, 2018

  • Allow loaded plugins.
  • Call plugins help.

(Needs neo-project/neo#466)

Allow loaded plugins
Call plugins help
"Advanced Commands:\n" +
"\tstart consensus\n");

Plugin.SendMessage(new string[] { "plugin-help" });
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just send "help"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I used a different word for plugins help that for node help because if we use the same it will trigger here https://github.com/neo-project/neo-cli/blob/62fef6c81f537d71a2232ec47c2b13ddd04385aa/neo-cli/Shell/MainService.cs#L52-L54

It's a cosmetic decision as the plugins help will appear over the node help.
Another option is to add GetHelp to the Plugin class and implement on plugins.

What do you think is better? If we are fine with the help order (plugins then node) I can change to just help.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe it can be like this:

help [plugin-name]

The plugin only processes its own help messages. If the plugin-name parameter is omitted, then no plugin will process this message. The help information for the node is printed by default.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Cool, done.

@erikzhang erikzhang merged commit a380a7c into neo-project:master Nov 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants