-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Defaults are missing in the namespace of the sub subcommand #29
Comments
I had not considered the case of several levels of subcommands. Not a bug, simply not yet implemented. Certainly makes sense that several levels of subcommands works as you expected. I will look into it to figure out how difficult it would be to implement. |
- Fixed type hint of skip in signatures, being more a general Container.
I have fixed the issue with the defaults. Though I don't yet consider this to be an officially supported feature. Thus for the time being I will not create a new release of the package. Please clone the repo to try it out. As a side note. The subcommands should be added in the order of the levels, just like in your example. First |
Works fine for me now. Thank you for the quick fix :) |
This is now included in release v3.1.0. |
Hi,
I've been trying to design cli with the several levels of subcommands. I want something like that:
app subcommand1 subcommand2 --arg1=foo
The problem is that when I add an argument with the default value into the subcommand2, this argument is not getting populated in the subcommand2 namespace.
Here is my code to verify that:
As the result I'm getting that:
Namespace(__cwd__=['....'], subcommand='subcommand1', subcommand1=Namespace(sub_foo='bar', subcommand='subcommand2'))
You can see here that the
subcommand2
Namespace is missing in the result. For thesubcommand1
namespace you see that the default argument is present (sub_foo='bar').Is that a bug, or am I doing something wrong here?
Best regards,
Oleksii
The text was updated successfully, but these errors were encountered: