Skip to content

Questions: How to create a sub-commands #14

Description

@ramukima

I wonder if this module will allow me to build a command/sub-command hierarchy, with following convention:

  1. A sub-command is itself a command
  2. Support any level of sub-command nesting

Example:

person: {
"name": "Joe",
"address": {
"street": "a-street",
"city": "a-city"
}
}

Considering above data-structure, I want to render commands dynamically....

  1. Create a Person.groovy that only exposes commands "name" and "address"
  2. When the user presses 'tab' after 'address', schema for 'address' is shown.
  3. Note that the schema could be further nested. I kept it simple for the sake of this example.

I guess, the dynamic nature of groovy can come handy to do this. Does this sound a reasonable thing to allow in the core ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions