bfgroup / Lyra

A simple to use, composable, command line parser for C++ 11 and beyond
https://bfgroup.github.io/Lyra/
Boost Software License 1.0
483 stars 58 forks source link

sub-command example not working #16

Closed gegles closed 4 years ago

gegles commented 4 years ago

When running the example with kill foo as param it fails with Unrecognized token error.

I believe this is due to testing the result variable too early: https://github.com/bfgroup/Lyra/blob/4f64eabb563215297fe868b61f0049a7e4d8abf8/examples/doc_commands.cpp#L84

if one comments this line it seems to work.