We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Start by posting ideas and requests to enhance a product or service. Take a look at ideas others have posted and vote them if they matter to you.
To post a new idea - select "Add a new idea" and where asked select the appropriate category this idea relates to. Provide requested information to allow us to get a better understanding of your request.
Vote ideas that matter most to you.
Get feedback from the IBM team to refine your idea.
The IBM team may need your help to refine the ideas so they may ask for more information or feedback. The offering manager team will then decide if they can begin working on your idea. If they can start during the next development cycle, they will put the idea on the priority list. Each team at IBM works on a different schedule, where some ideas can be implemented right away, others may be placed on a different schedule.
Some ideas can be implemented at IBM, while others may not fit within the development plans for the product. In either case, the team will let you know as soon as possible. In some cases, we may be able to find alternatives for ideas which cannot be implemented in a reasonable time.
The shorter URL for this site: http://ibm.biz/cloudideas
For any defect or support needs, visit the IBM Cloud Support Center.
For technical Q&A, use Stack Overflow and tag with "ibm-cloud".
In your documentation is mentioned, that a command is incorrect usage should print out the help page:
https://github.com/IBM-Cloud/ibm-cloud-cli-sdk/blob/master/docs/plugin_developer_guide.md#25-incorrect-usage
The help page is defined by that structure of yours:
https://github.com/IBM-Cloud/ibm-cloud-cli-sdk/blob/master/docs/plugin_developer_guide.md#11-register-a-new-plug-in
--- SNIP ---
func (p *FssPlugin) GetMetadata() plugin.PluginMetadata {
// define plugin namespace
fssNamespace := plugin.Namespace{
Name: "mpl",
Description: "Doing stuff",
}
return plugin.PluginMetadata{
Name: "my.plugin",
Version: plugin.VersionType{
Major: 0,
Minor: 0,
Build: 1,
},
MinCliVersion: plugin.VersionType{
Major: 0,
Minor: 0,
Build: 1,
}, Namespaces: []plugin.Namespace{
fssNamespace,
},
Commands: []plugin.Command{
{
Namespace: fssNamespace.Name,
Name: "my-command",
Description: "Doing stuff",
Usage: "bx mpl my-command KEY VALUE\n KEY is the key of the configuration e.g. my-config\n VALUE is the value of the configuration e.g. fg",
Hidden: false,
}
...
--- SNAP ---
So it would be great, if we could just this information to build the help out instead of duplicate the text and generate an own help output
Idea priority | Low |
By clicking the "Post Comment" or "Submit Idea" button, you are agreeing to the IBM Ideas Portal Terms of Use.
Do not place IBM confidential, company confidential, or personal information into any field.
The IBM SDK does not provide any support to print out the help in case of incorrect usage as recommended here: https://github.com/IBM-Cloud/ibm-cloud-cli-sdk/blob/master/docs/plugin_developer_guide.md#25-incorrect-usage
So if an invalid option combination is used, the IBM SDK help printout can't be triggered, hence as plugin developer, you have to code the print out again manually.
We will stick to it, that we just print out: "invoke help" instead of maintaining the help output twice.
The plugin should implement the help command so that they can define exactly what is shown to the user. This way, the plugin can update the help command if new commands are added/removed/modified. Please let me know if you have additional questions, or feel free to create an issue on the IBM Cloud CLI SDK repo, here: https://github.com/IBM-Cloud/ibm-cloud-cli-sdk
Marking this idea as Closed.
it would be nice, if the plugin developer would not to have to maintain two places of help output.
We will stick to it, that we don't generate any manual help output, as long IBM does not provide any easy way to reuse their help output. Instead we will advide the IBM CLI user to invoke the help command. That is not user-friendly, but it would reduce the risk of getting out of sync regarding the two help outputs.
For the help message, both the core CLI and plugin can build the help message. If the plugin has the help command implemented, then the core CLI will delegate to the plugin, otherwise the core CLI will show the help message. Specific help output should be done by the plugin since the plugin will know exactly which options are required and which are not. Does this help answer your questions?