1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-30 20:53:52 +00:00

1125 Commits

Author SHA1 Message Date
Rafi Wiener
048f968504 Add support for delimiter when parsing vector (#209)
This commit allows parsing any char separated list given by the user.
E.g app -a 1,2,3
std::vector<int> params;
app.add_option("-a", params, "Parse the params", ',');

Signed-off-by: Rafi Wiener <rafiw@mellanox.com>

add tests for delimiter parsing

Signed-off-by: Rafi Wiener <rafiw@mellanox.com>

Fixing style, adding docker version of clang-format
2019-02-06 15:15:31 +01:00
Philip Top
598046c397 Add unnamed subcommand (#216)
increment the parse_ variable on unnamed subcommands. 

update the readme, and add a formatter test for nameless subcommands in nondefault group with other named subcommands.

add a test of default arguments

add a formatter test

add tests for unnamed subcommands and an example of the partitioned subcommands.

change the app_p to be a shared_ptr so you can add an App later on and merge them together

add the ability to add unnamed subcommands that allow partitioning on options into multiple apps.
2019-02-06 10:27:06 +01:00
Henry Schreiner
b4910df3d7
Move to using literals in testing (#213) 2019-02-01 11:32:47 +01:00
Henry Fredrick Schreiner
23802ea123 Fix some text from last PR 2019-02-01 09:58:05 +01:00
Rafi Wiener
d3c3a4c58f add validator for ip address and positive number 2019-02-01 00:43:26 +01:00
Philip Top
b26894458b add some more tests of custom parsers and adjustments to the README
Add a test that creates and uses a custom parser to store a value

add a check around regex to see if it is working

fix warning in AppTest from gcc
2019-01-31 23:53:04 +01:00
Philip Top
7cd04e3b65 Fixes some cmake issues when using earlier cmake versions specifically Boost::boost is not defined before boost 3.5.2 so 3.4 doesn't work. also the AND condition for MSVC didn't work on older cmake 2019-01-31 19:05:55 +01:00
Henry Fredrick Schreiner
59de6befa4 Try 1.7.1 online 2019-01-30 17:49:04 +01:00
Philip Top
1a6ed01d87 add some additional tests for the failure case, and update the README with documentation on the new function.
use bracket initialization

add callback functions for options with the derived values
2019-01-30 16:44:04 +01:00
Philip Top
49ac989a95 Fixes to the readme v1.7.1 2019-01-30 14:13:01 +01:00
Henry Fredrick Schreiner
35828ea6be Preparing for 1.7.1 2019-01-30 14:13:01 +01:00
Philip Top
45496a836a The add subcommand function was not exception safe. It added the subcommand to the vector before checking the already added option. This would result in duplicate subcommands being in place in the subcommands_ vector. The modifications make it exception safe and remove what I think was an unnecessary check for pointer duplication, that as far as I can tell was always false since it was comparing a newly created pointer directly to previously created ones. 2019-01-25 21:53:10 +01:00
Henry Fredrick Schreiner
478f582a71 Adding metadata to conan 2019-01-25 09:23:37 +01:00
Philip Top
f542179924 add = and : escape detect with different branch in escape_detect code. The tests were verified to fail if the fix was not in place. 2019-01-25 09:21:47 +01:00
Henry Fredrick Schreiner
2f551e2ef6 Fix for GCC 8 warning 2019-01-25 09:21:47 +01:00
Henry Fredrick Schreiner
411364a59d Add conversion note to changelog v1.7.0 2019-01-24 11:21:17 +01:00
Henry Fredrick Schreiner
97f5730979 Preparing for 1.7 2019-01-24 11:05:06 +01:00
Henry Schreiner
02c49388d7
Making mutable sets explicit (#200) 2019-01-24 10:10:37 +01:00
Fred Helmesjö
8d7aefe21f Added option description setter (#199)
* Added posibility to modify option description: Option::description(const std::string&).
Related: https://github.com/CLIUtils/CLI11/issues/193

* Return Option* from Option::description(...).
Format-fix to make clang-format happy.

* Fixing format

* Added posibility to modify app description: App::description(const std::string&).

* Fixing Style

* Update readme and changelog
2019-01-22 18:19:47 +01:00
Henry Fredrick Schreiner
72c384cfbb Adding notes to changelog 2019-01-19 12:35:16 +01:00
Henry Schreiner
3038540bd9
Help delete (#196)
* Getting a bit closer to Version 1.7

* Check and fix for deleting an option pointer directly that is also a help option. It is not common, but could be done
2019-01-19 12:26:31 +01:00
ncihnegn
9cfa0f44a0 Add quotes to values containing spaces (#198)
* Add test case for INI output of defaulted options

* Add quotes to values with spaces

* Fixing formatting

* Only fix quote strings, not vectors
2019-01-19 12:25:00 +01:00
Henry Fredrick Schreiner
bd67a953b2 Tighten up syntax from recent PR a bit 2019-01-19 11:17:25 +01:00
nurelin
1933a21a6d Reword help message to include help_all flag (#197)
* Reword help message to include help_all flag

* Adding test for combined simple message
2019-01-18 23:29:28 +01:00
Henry Schreiner
c65d9fdcb2
Dropping deprecated names (#192) 2019-01-13 13:52:42 +01:00
Henry Fredrick Schreiner
7f463c9db3 Add recent changes
[skip ci]
2019-01-13 09:13:58 +01:00
Philip Top
663d93c792 Clear up Wshadow warnings from gcc 4.9 (#191)
* Clear up Wshadow warnings from gcc 4.9.  Most of these were local variable names with the same name as a member function.
Also a few spelling fixes and adding some std::move around some of the arguments when appropriate.

* Touchup
2019-01-13 09:12:48 +01:00
Henry Schreiner
0086ddd224
Adding Windows style options default on Windows (#190)
* Adding Windows style options default on Windows

* Fixing test defaults on Windows
2019-01-13 08:29:54 +01:00
Henry Fredrick Schreiner
66fedad044 Adding check for Windows definition order match from #187 2019-01-11 13:23:28 +01:00
Henry Schreiner
f932b51374
Touchupwin (#189)
* Move lambda funtion to real function

* Fix some warnings when compiling in LLVM

* Adding one test back in

* Adding details to changelog
2019-01-11 11:58:00 +01:00
Philip Top
ce6dc0723e add options to handle windows style command line options (#187)
* add some fields and functions for windows like options
add test cases for windows options and refactor for additional string functions

* try to fix code coverage to 100% again.  add some additional documentation and a few additional test cases to verify documentation

* remove some extra brackets
2019-01-10 23:07:17 +01:00
Henry Fredrick Schreiner
2c024401cc Minor touch up after #186 2019-01-06 10:46:12 +01:00
Philip Top
30c2e327d1 Add single string parsing (#186)
* add Tests and ability to handle program file inclusion in the single string.

add the ability to deal with a single string in the parse command and handle quoted string appropriately

* Add extra test cases for full coverage, clear up escape quote sequencing and handling of extra spaces
2019-01-06 10:30:49 +01:00
Henry Fredrick Schreiner
3a2c5112a3 Adding missing tests from #185, should hit full coverage again 2019-01-03 13:12:48 +01:00
Henry Fredrick Schreiner
f49447c590 Adding some updates to changelog and readme 2019-01-03 09:36:24 +01:00
Philip Top
a83109002c Add ignore underscore (#185)
* add ignore_underscore test cases and options to app

* add ignore_underscore for add_sets and some more tests for the sets and subcommands

* add some documentation lines and some failing tests

* update readme with ignore_underscore option

* remove failing tests from known issue

* remove empty line for code coverage
2019-01-03 09:22:09 +01:00
Henry Schreiner
c3d8d4a2d0
Adding new parse layout (#178)
* Adding new parse layout

* Dropping shortcurcuit from help, since it has special override

* Refactor help call

* Dropping shortcurcuit since it is not needed now that help has custom behavoir

* Dropping MaxSubcommand error (cannot occur)
2019-01-02 22:16:42 +01:00
Henry Fredrick Schreiner
2ba85eb76c Dropping explicit sudo=false due to Travis deprecation 2018-12-19 14:20:19 +01:00
Henry Fredrick Schreiner
524dd85a91 Fixing doxygen download 2018-12-19 14:20:19 +01:00
Aleksey Mikhaylov
0387f35ec8 Prefer BUILD_TESTING over CLI11_TESTING if defined 2018-12-18 19:47:38 +01:00
Henry Fredrick Schreiner
bd4dc91184 add extra test v1.6.2 2018-11-24 23:40:18 +02:00
Henry Fredrick Schreiner
afa7a45665 Preparing for 1.6.2 2018-11-13 21:45:38 +01:00
Henry Schreiner
a78f5bcdcf
Dropping links if option removed (#179) 2018-11-13 17:12:48 +01:00
Henry Schreiner
b683f4ed96
Fix for spurious printout (#177) 2018-10-22 18:39:23 +02:00
Henry Fredrick Schreiner
6bd31c392d Fixing #168 2018-10-21 12:16:34 +02:00
Henry Fredrick Schreiner
899100c161 Update json (for tests) to 3.3.0, GCC 4.8 support added 2018-10-06 07:37:38 +02:00
Henry Fredrick Schreiner
da901cca54 Fix logic error for #158 2018-09-16 13:50:08 +02:00
Henry Fredrick Schreiner
e04498c94d Better help-all, prints more info, better spacing 2018-09-06 20:47:52 +02:00
Henry Fredrick Schreiner
4389b332ff Adding info to changelog 2018-09-03 22:48:45 +02:00
Henry Fredrick Schreiner
0cb3959755 Fix for warnings in MSVC #157 2018-09-03 22:48:45 +02:00