Skip to content

Allow for nested subcommands with ZSH generation.#2100

Merged
bors[bot] merged 1 commit intoclap-rs:masterfrom
newAM:issue/2098
Aug 24, 2020
Merged

Allow for nested subcommands with ZSH generation.#2100
bors[bot] merged 1 commit intoclap-rs:masterfrom
newAM:issue/2098

Conversation

@newAM
Copy link
Contributor

@newAM newAM commented Aug 22, 2020

Closes #2098

Copy link
Member

@pksunkara pksunkara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test. I am not sure the logic is correct, but let's see.

@newAM
Copy link
Contributor Author

newAM commented Aug 23, 2020

Please add a test.

Done! Here's a link to a asciinema of the content of that test in action: https://asciinema.org/a/vdLVvh13ypq0AKERZHWiu8otb

I am not sure the logic is correct, but let's see.

Yeah this one is difficult since the behavior of parser_of was not clear to me.

I think I captured the original intent though; I think the function is supposed to return the last parser in a chain of sub-commands, but there was no recursion to allow for multiple levels of sub-commands.

@newAM newAM requested a review from pksunkara August 23, 2020 16:42
Copy link
Member

@pksunkara pksunkara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 24, 2020

Build succeeded:

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

Successfully merging this pull request may close these issues.

clap_generate panics for ZSH with nested subcommands

2 participants