Bfgroup Lyra Versions Save

A simple to use, composable, command line parser for C++ 11 and beyond

1.6.1

1 year ago

Only bug fixes for compile warnings and a pair of bad argument names. Changes:

  • Fix variable name shadowing warnings. -- Sadie Powell
  • Fix command::operator|= function signature. -- Henrik Gaßmann

1.6

2 years ago

Even though most of the changes for this release are to fix various reported bug fixes, fixing those bugs has meant dealing with some long standing internal parser inconsistencies. While I try to not break backwards compatibility, I likely can't catch all of the corner cases people have discovered.

WARNING: This release has some internal cleanup of the parser result types. It also has an externally visible change to the parse function result type. It renames the errorMessage() function to message(). The errorMessage() function is marked deprecated and will be removed in a future release.

Changes:

  • New: Add lyra::option_style type to better customize the syntax of options allowed. This replaces the "old" lyra::parser_customization as a better way. The lyra::parser_customization is now deprecated, and will be removed at some future release. -- René Ferdinand Rivera Morell
  • New: Add example to show how to count flags with cardinality greater than one (1). Shows how to handle increasing verbosity with -vvvv. -- René Ferdinand Rivera Morell
  • New: Add capability to control the cardinality of argument groups. -- René Ferdinand Rivera Morell
  • New: Allow setting hint after construction of lyra::bound_parser. -- Max Ferger
  • Fix virtual overload hiding of parse method. -- René Ferdinand Rivera Morell
  • Fix previously removed error for when expected option specifications do not have the required - prefix. -- René Ferdinand Rivera Morell
  • Fix inconsistencies in parsing arguments in a group followed by other arguments. (issue #49) -- René Ferdinand Rivera Morell
  • Fix incorrectly accepting negative values for unsigned integer arguments. The argument value conversion now checks the input for acceptable digits in the input before attempting to parse it. -- René Ferdinand Rivera Morell
  • Fix sub-command arguments being ignored even when they are marked as required. -- René Ferdinand Rivera Morell
  • Fix assigned values for flag options (--flag=no) being ignore. They now cause an error when specified. -- René Ferdinand Rivera Morell
  • Fix choices being allowed for for flag options, but ignored. Specifying choices on flag options now signal an error. -- René Ferdinand Rivera Morell
  • Tested with Visual Studio 2019, VS 2022, MinGW-64 (gcc 8.1.0), Linux ( clang 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13; gcc 5, 6, 7, 8, 9, 10, 11), Xcode (11.2.1, 11.3.1, 11.4.1, 11.5, 11.6, 11.7, 12.0.1, 12.2, 12.3, 12.4, 13.0), on Azure Pipelines; and with VS 2015, VS 2017, MinGW-64 (gcc 6.3, 7.3) on AppVeyor.

1.5.1

3 years ago

Minor change to bring back the missing option argument hints from the usage help output.

1.5

3 years ago

This release has some big changes in easy of use and functionality. There are now alternate interfaces for specifying and fetching arguments. Also the help output is now more compact and clearer. There is also new support for sub-commands.

WARNING: The cli_parser type was renamed to cli. Both the cli_parser type and the lyra/cli_parser.hpp header are deprecated and will be removed in a future release.

WARNING: Changed the install CMake target from BFG::Lyra to bfg::lyra.

Changes:

  • New: Main encapsulation of common use case of help option handling. With shorthand specification of arguments. -- René Ferdinand Rivera Morell
  • New: Ability to specify argument values, with default, without specifying a local external to the parser variable. Making it easier to specify command lines. The values can be retrieved from the cli as a map from argument names to the value. -- René Ferdinand Rivera Morell
  • New: Support construction of lyra::args from iterators for cases where the arguments come from some existing container. -- René Ferdinand Rivera Morell
  • New: Add Cmake install support. -- Jayesh Vinay Badwaik
  • New: Command argument to make it easy to specify sub-commands. -- René Ferdinand Rivera Morell
  • New: Alternative sequential argument parsing mode. -- René Ferdinand Rivera Morell
  • New: Grouped arguments to specify and handle sub-command parsers. -- René Ferdinand Rivera Morell
  • New: literal parser to directly match an argument. -- René Ferdinand Rivera Morell
  • Fix missing hint text for optional, lyra::arg, arguments. -- René Ferdinand Rivera Morell
  • Bring back some cleaner and compact formatting of the help text. -- René Ferdinand Rivera Morell
  • Tested with Visual Studio 2017, VS 2019, MinGW-64 (gcc 8.1.0), Linux (clang 3.9, 4, 5, 6, 7, 8, 9, 10; gcc 4.9, 5, 6, 7, 8, 9, 10), Xcode ( 11.1, 11.2.1, 11.3.1, 11.4.1, 11.5, 11.6), on Azure Pipelines; and with VS 2015, MinGW-64 (gcc 6.3, 7.3) on AppVeyor.

1.4

3 years ago

Another round of small fixes and one new feature. Changes:

  • New Allow passing option value choices as an array. -- Rene Rivera
  • Fix sample code in README to be correctly namespaced. -- Jayesh Badwaik
  • Fix commands example to actually show help when specified. -- Shreyas Potnis
  • Tested with Visual Studio 2017, VS 2019, MinGW-64 (gcc 8.1.0), Linux (clang 3.8, 3.9, 4, 5, 6, 7, 8, 9, 10; gcc 4.8, 4.9, 5, 6, 7, 8, 9, 10), Xcode (10.1, 10.2.1, 10.3, 11.1, 11.2.1, 11.3.1, 11.4), on Azure Pipelines; and with VS 2015, MinGW-64 (gcc 6.3, 7.3) on AppVeyor.

1.3

4 years ago

A few small new features, bug fixes, and continued cleanup on the road to reducing memory allocations. Changes this time around:

  • New: Accept -o2 style option+value arguments. -- Rene Rivera
  • New: Accept -abc option name spelling as shorthand for -a, -b, -c. -- Rene Rivera
  • Fixed inconsistent handling of option values that look like options, like negative numbers. -- Rene Rivera
  • Rewrote argument token parsing for clarity, to avoid extra token buffer allocation, and to allow for more option & value variations. -- Rene Rivera
  • Fixed allowing junk extra characters after a non-string option value. -- Rene Rivera
  • Support specifying a single value for choices of an argument. -- Rene Rivera
  • Fix various problems with the commands example program. Also now the examples for the documentation are unit tested along with the regular unit tests. -- Rene Rivera
  • Tested with Visual Studio 2015, VS 2017, VS 2019, MinGW-64 (gcc 8.1), Linux (clang 3.5, 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8, 9; gcc 4.8, 4.9, 5, 6, 7, 8, 9), Xcode (9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 9.4, 9.4.1, 10.0, 10.1, 10.2, 10.2.1, 10.3, 11.0, 11.1, 11.2, 11.2.1), on Azure Pipelines.

1.2

4 years ago

Concentrated on new features. Many of them from old Clara requests. But also continued internal cleanup of code. The changes are:

  • New: One can now accept 1-or-more on bound container arguments by only specifying required() on such arguments. -- Rene Rivera
  • New: One can now define a description text to display as general command information with the help::description method. -- Rene Rivera
  • New: Add named methods as alternates for operators to add and specify arguments. They follow the familiar Python argparse nomenclature. -- Rene Rivera
  • New: Single header file alternative version of the library. For those that need or want such a thing. -- Rene Rivera
  • Improve help for arguments that specify a cardinality. -- Rene Rivera
  • Addition of more complicated use cases to demonstrate flexibility of library. -- Rene Rivera
  • Continued internal clean up of code for stability and easier future enhancements. -- Rene Rivera

As mentioned above there is now a single header version of the library. It's included in the release archive as data/single_include/lyra/lyra.hpp. You can also get it directly from here.

1.1

4 years ago

This is mostly a maintenance release. Which means fixing bugs, more documentation changes, and more tested compilers. Thanks to people for pointing out problems. And, thanks to Matt Godbolt's suggestion, there is one new feature:

  • New: Add direct Meson Build use support. -- Rémi Gastaldi
  • New: Define argument value choices() as either a fixed set or checked by a custom lambda function. -- Rene Rivera
  • Fix being able to parse straight from args outside of cli_parser. Which resulted in misleading parsing behavior. Rene Rivera
  • Fix use of cardinality() to correctly constrain bounded cardinality ranges like [0,n], [n,m], [n,n], and [0,0] (unbounded). Rene Rivera
  • Fix use of required() arguments such that the parse errors if they are absent. -- girstsf
  • Remove uses of assert macro to avoid internal aborts and make it easier to use as a library. -- Rene Rivera
  • Many documentation improvements. -- Rene Rivera
  • Tested with Visual Studio 2015, VS 2017, VS 2019, MinGW-64 (gcc 8.1), Linux (clang 3.5, 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8, 9; gcc 4.8, 4.9, 5, 6, 7, 8, 9), Xcode (9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 9.4, 9.4.1, 10.0, 10.1, 10.2, 10.2.1, 10.3, 11.0), on Azure Pipelines.