Skip to content
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

Questions: How to create a sub-commands #14

Open
ramukima opened this issue Jul 25, 2014 · 0 comments
Open

Questions: How to create a sub-commands #14

ramukima opened this issue Jul 25, 2014 · 0 comments

Comments

@ramukima
Copy link

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 ?

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

No branches or pull requests

1 participant