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

Question: one single argument for multiple repeating subcommands #506

Open
alegomes opened this issue Apr 2, 2024 · 1 comment
Open

Comments

@alegomes
Copy link

alegomes commented Apr 2, 2024

Following you suggestion on #505, I'm using the subcommand chaining strategy. However, I ran into the issue bellow:

In the following example:

myCmd subCmd1 --optA=x subCmd2 --optB=y anArgument

Is it possible to make anArgument an argument of both subcommands subCmd1 and subCmd2?

thanks!

@ajalt
Copy link
Owner

ajalt commented Apr 2, 2024

No, but you can pass information between subcommands with a context object

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