Skip to content

make duplicate subcommands work - #247

Merged
henryiii merged 1 commit into
CLIUtils:masterfrom
phlptp:duplicate_subcommands
Mar 3, 2019
Merged

henryiii merged 1 commit into
CLIUtils:masterfrom
phlptp:duplicate_subcommands

Conversation

@phlptp

@phlptp phlptp commented Mar 3, 2019

Copy link
Copy Markdown
Collaborator

This PR is a first cut at making duplicate subcommands work reasonably without adding any extra methods. I added one test case with duplicates. There probably should be a few more tests added about the interactions of duplicate subcommands and subcommands with duplicate names in different option groups.

@codecov

codecov Bot commented Mar 3, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #247 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #247   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines        2556   2566   +10     
=====================================
+ Hits         2556   2566   +10
Impacted Files Coverage Δ
include/CLI/App.hpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8ebce7...01a3934. Read the comment docs.

@codecov

codecov Bot commented Mar 3, 2019

Copy link
Copy Markdown

Codecov Report

Merging #247 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #247   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines        2556   2566   +10     
=====================================
+ Hits         2556   2566   +10
Impacted Files Coverage Δ
include/CLI/App.hpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9934e0...d5ec354. Read the comment docs.

…and make sure that executes them over running the same one twice.

make duplicate subcommands work
@phlptp
phlptp force-pushed the duplicate_subcommands branch from d5ec354 to 01a3934 Compare March 3, 2019 14:22
@henryiii

henryiii commented Mar 3, 2019

Copy link
Copy Markdown
Collaborator

This looks pretty good. I'd like to add the ability to run app callbacks multiple times in order, with the correct options run each time, but that's a more complex, trickier change.

@henryiii

henryiii commented Mar 3, 2019

Copy link
Copy Markdown
Collaborator

I'll merge if you think it's ready.

@phlptp

phlptp commented Mar 3, 2019

Copy link
Copy Markdown
Collaborator Author

There are some more issues with fallthrough and nested option groups that this doesn't deal with but that is somewhat more complex and I am working on another change that will fix that. But for the moment I think this is fine, and seems to be working.

@henryiii
henryiii merged commit 2cd58ef into CLIUtils:master Mar 3, 2019
@phlptp
phlptp deleted the duplicate_subcommands branch April 29, 2019 13:39
@henryiii henryiii added this to the v1.8 milestone Dec 31, 2019
@robertohueso robertohueso mentioned this pull request Jun 26, 2020
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.

2 participants