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

Call other Command from Command #4

Closed
julianpaulozzi opened this issue Nov 5, 2015 · 3 comments
Closed

Call other Command from Command #4

julianpaulozzi opened this issue Nov 5, 2015 · 3 comments

Comments

@julianpaulozzi
Copy link

Some form of call another command within the active command?
Or set the next command in front of ">"?

@poxet
Copy link
Collaborator

poxet commented Nov 6, 2015

I am not sure what you mean. Do you have an example?

@julianpaulozzi
Copy link
Author

I have utility command serving as a "parameters builder" for a more complex command (on RootCommand).
Soon after 'build' would expose the command to run directly.

@poxet
Copy link
Collaborator

poxet commented Nov 7, 2015

If I understand this correctly, you want the output of one command to be the input of another command.

For now, there is a workaround for this. I added an example named ParametersCommand where you can execute param build to build parameters and param execute that uses the same way of building parameters.

What it does is to have a method exposed (CreateParameters) that can be used by several commands.

This can also be used if you have commands that overlap and you do not want to have duplicate code.

Please get back to me if this soles you problem, and if not. A suggestion on how it should work would be great.

@poxet poxet closed this as completed Nov 16, 2015
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

2 participants