1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 12:13:52 +00:00

66 Commits

Author SHA1 Message Date
Philip Top
06ab2d0fbd Footer callback (#309)
fix incorrect parenthesis

update some clang-tidy fixes mainly else after return but a few conversions from into to bool

add extra newline before footer

add an extra field to the extra Error

add a footer callback for help operations
2019-08-18 19:51:14 -04:00
Henry Schreiner
d81843002a
To string and default option revamp (#242)
* First streaming version

* Using to_string instead

* Switching to new backend

* Moving to capture function for defaults

* Rename capture_default + _str

* defaultval -> default_str, added always_capture_default

* Fix style

* Adding tests and docs to readme

* Dropping macOS on Travis (supported through Azure)
2019-04-28 22:44:30 +02:00
elszon
ca4bc6a6fc Aligment in multiline description (#269) 2019-04-28 16:22:36 +02:00
Philip Top
3f9fafd916 make immediate_callback inheritable, add tests for that and for valid strings, some cleanup in the README.md
Apply suggestions from code review

Co-Authored-By: phlptp <top1@llnl.gov>
allow callbacks for option_groups, and allow some other characters as flags
2019-03-22 17:56:36 -04:00
Philip Top
e9934e058d add transformer and checkedTransformer (#239)
* add transform and checkedTransform tests

add Transformer and CheckedTransformer validators

* Eliminate the Validator description string, some code cleanup

add tests

Make Validators a full Object and remove friend,  move to descriptions instead of overriding type name.

update validators to actually merge the type strings and use all validators in the type outputs

rework join so it works without the start variable,  allow some forwarding references in the validator types, some tests for non-copyable maps, and transforms

merge the search function and enable use of member search function,  make the pair adapters forwarding instead of copying

* add a few more tests and documentation

fix some gcc 4.7 issues and add a few more test cases and more parts of the README

Work on ReadMe and add Bound validator to clamp values

* updates to README.md

* Add some more in TOC of README and fix style in Option.hpp
2019-03-02 12:24:26 +01:00
Henry Schreiner
17d05b000c
Adding map support to IsMember (#228)
* Adding first draft of mapping

* IsMember now supports maps

* Adding example, better Val combs, and cleanup

* Reversing order of map, adding pair support

* Check/Transform suppport for Validators

* Adding enum tools from @phlptp, more tests
2019-02-20 17:17:51 +01:00
Henry Schreiner
c9123811d1
CLI::IsMember (#222)
* Adding first draft of Sets

Use IsMember now

Using IsMember as backend for Set

Non-const validator backend

Move set tests to set

Clearer inits

* Drop shortcut

Tighten up classes a bit for MSVC

Check with GCC 4.8 too

* Simpler templates, but more of them

Dropping more type safety for older compilers

Shortcut string set

* Adding shortcut init

Making g++ 4.7 docker image happy

Fix Clang tidy issue with last commit

Adding one more shortcut, adding a couple of tests

* Dropping dual pointer versions of code

* Smarter shortcut syntax

* Adding slighly faster choices

* Cleanup to make InMember simpler

* Drop choices for now, adding some tests

* ValidationError is now always the error from a validator

* Support for other types of initializer lists, including enums

* Factor out type utilities, single version of IsMember code

* Adding a few tests for #224

* Minor cleanup for Validation Error

* Adding tests, moved deprecated tests

* Docs updates
2019-02-19 09:56:02 +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 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
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 Fredrick Schreiner
e04498c94d Better help-all, prints more info, better spacing 2018-09-06 20:47:52 +02:00
Henry Fredrick Schreiner
85aa0e7813 Dropping last (required) usages of clear 2018-06-27 12:26:03 +02:00
Henry Fredrick Schreiner
8635c4d0eb Dropping reset in favor of clear 2018-06-27 12:26:03 +02:00
Henry Fredrick Schreiner
98b31d788b Adding tests and deprecation messages 2018-06-18 15:13:59 +02:00
Henry Fredrick Schreiner
b2e471ac4d Removing set_ for failure_message, footer, name, and callback 2018-06-18 15:13:59 +02:00
Henry Schreiner
bf2bc39c30 Rename to set_* on options and add return this
Now use type_name and type_size instead of set_custom_option.
2018-06-18 15:13:59 +02:00
Henry Fredrick Schreiner
d46c2c5727 Adding Config class 2018-05-09 16:08:32 +02:00
Henry Fredrick Schreiner
101d847c29 Use filter fn to simplify, sort includes 2018-05-06 18:36:33 +02:00
Henry Fredrick Schreiner
f89f283a62 Filling out tests 2018-05-03 18:30:59 +02:00
Henry Fredrick Schreiner
e7483afc41 Adding functional form of Type printout 2018-05-03 18:30:59 +02:00
Henry Fredrick Schreiner
2b6b62c52c Adding smart validators 2018-05-03 17:04:13 +02:00
Henry Fredrick Schreiner
af2ed66d6e Just use Formatter
Removing OptionFormatter

Rename files

Rename to just Formatter

Remove OptionFormatMode (just needs a bool)

Renaming option functions on formatter
2018-04-30 08:17:31 -04:00
Henry Fredrick Schreiner
952f2913e3 First attempt at formatter (app and option)
in progress: formatters

Getting closer

Working on apps

One test actually runs

All builds, added filter functions

Reverting a few behavours as needed

Repairs

All tests pass

Fixing error with adding help flag

Labels are simpler mappings, normalized setters

Adding help_all

Adding a few more tests

One more line tested

Adding one more check

Adding to readme

Simplify naming

Adding default constructors

Fixing spacing issues with subcommand all printout

Adding a couple of tests
2018-04-30 08:17:31 -04:00
Henry Fredrick Schreiner
54308171ca Adding group ordering test 2018-04-12 08:58:20 +02:00
Henry Fredrick Schreiner
067bb43a84 Adding REQUIRED and Needs, using simple name more often 2018-04-12 08:34:22 +02:00
Henry Fredrick Schreiner
c63288a91c Adding set_name and support for names to app 2018-04-11 22:18:22 +02:00
Henry Fredrick Schreiner
8e650c3873 Adding two required functions 2018-04-11 22:18:22 +02:00
Henry Fredrick Schreiner
e12a295e33 Fixing some warnings 2018-04-09 14:58:51 +02:00
Henry Fredrick Schreiner
0959430e57 Adding test for #87 2018-04-08 15:47:36 +02:00
Henry Fredrick Schreiner
d2d4f07fd4 Dropping CLI_ in favor of CLI11_ everywhere 2018-04-04 18:29:32 +02:00
Henry Fredrick Schreiner
268c26ad62 Fix #64 by auto-adding symmetric excludes 2018-03-26 10:56:08 +02:00
Henry Schreiner
5186158442
Rename requires to needs (#82)
* Adding fix for #75, rename requires to needs

* Removing check for install commands (should still be run in subproject)
2018-03-08 11:48:40 +01:00
Henry Fredrick Schreiner
3e651e3b7e Moved more string processing to Error 2017-11-26 15:11:48 -05:00
Henry Fredrick Schreiner
a958ffece2 Dropping name from simple print, better seperation for Errors
Some error codes are renamed
2017-11-22 22:41:14 -05:00
Henry Fredrick Schreiner
b45917e3e5 Dropping ERROR in simple printout 2017-11-22 16:55:48 -05:00
Henry Fredrick Schreiner
87425617cd Minor typo fixes in README
[skip ci]
2017-11-22 15:21:48 -05:00
Henry Fredrick Schreiner
851f8dc83d Adding and fixing a test for single name 2017-11-22 14:33:55 -05:00
Henry Fredrick Schreiner
3cf5156b5e Adding tests for help print 2017-11-22 13:45:18 -05:00
Henry Fredrick Schreiner
2d8d659ab1 Increasing test coverage 2017-11-20 18:07:13 -05:00
Henry Fredrick Schreiner
92a3cacd59 Dropping hidden keyword, just use empty string 2017-11-20 18:07:13 -05:00
Henry Fredrick Schreiner
9b5867869d Refactoring default for options 2017-11-20 18:07:13 -05:00
Henry Fredrick Schreiner
f7e10d02ef set_help_flag now can replace a flag if needed, or remove it 2017-11-20 11:39:11 -05:00
Henry Fredrick Schreiner
1c5c8391f7 Deregister help if added previously 2017-11-20 11:39:11 -05:00
Marcus Brinkmann
077ba40417 Allow to customize help flag. 2017-11-20 11:39:11 -05:00
Marcus Brinkmann
ce007eb5a2 Allow to set a footer in the description 2017-11-20 10:11:23 -05:00
Henry Schreiner
93311928d7 set_default_str and set_default_val update (#27)
* set_default_str and set_default_val update

* Fixes for style checking
2017-09-01 23:23:31 -04:00
Henry Fredrick Schreiner
e3423bb5ad Futher improvement for #12, can change type str 2017-06-05 08:58:01 -04:00
Henry Fredrick Schreiner
27f718125d Reformat with clang-format 2017-05-31 12:03:05 -04:00
Henry Fredrick Schreiner
101c926dac Adding tidy cleanups (modernize) 2017-05-31 07:38:22 -04:00