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

Add support for sub commands #80

Open
ghost opened this issue Oct 1, 2020 · 1 comment
Open

Add support for sub commands #80

ghost opened this issue Oct 1, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 1, 2020

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
I would like to have a feature where I can add a subcommand to a task, like you see with kubectl or gcloud.

So that I can do the following
customctl command subcommand --argument value

Additional context
Just like

kubectl config get-contexts

If there is any other way I can do this, please let me know :-)

@ghost ghost added the enhancement label Oct 1, 2020
@airtonix
Copy link

airtonix commented Apr 3, 2021

if it's just a matter of taste that you want the subcommands separated by spaces, then I would suggest following this pattern commonly used in the npm/yarn world:

tasks:

  greet:
    usage: Say hello to someone
    options:
      name:
        usage: A person to say "Hello" to
        default: World
    run: echo "Hello, ${name}!"

 greet:me:
    run:
      task:
        name: greet
        options: { name: 'me' }

 greet:you:
    run:
      task:
        name: greet
        options: { name: 'you' }

tusk greet:me

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

No branches or pull requests

1 participant