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

26 Commits

Author SHA1 Message Date
Philip Top
a1135bb30c
Add environment variable processing to the configuration pointer. (#891)
Fixes #890 

Add parsing of environmental variables when supplied for the config file
option.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-27 11:40:22 -07:00
Volker Christian
eb4913d53e
Add REQUIRED to an app-name in case it is listed in the subcommand list of another app. (#860) 2023-03-13 11:55:04 -07:00
Philip Top
89601ee253
fix: isolate definition of NOMINMA and skip undef if defined (#848) 2023-02-16 08:24:47 -05:00
Philip Top
69c79b0343
fix: parse config file remaining (#839)
* update the storage of remaining argument for config files, so that they work through the `remaining_for_passthrough` with values when parsed a second time.

* style: pre-commit.ci fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-11 05:42:46 -08:00
Philip Top
3cd730b18b
fix: windows.h include (#832)
* remove the windows.h includes so it doesn't conflict with other windows applications.  Or at least minimizes the potential conflicts

* style: pre-commit.ci fixes

* fix ordering of windows includes

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-21 12:12:10 -05:00
Andrey Zhukov
a227cd10fc
feat: unicode support (#804)
* Add unicode support tests

* Add unicode parse tests

* Implement #14

* Slim down Windows.h

* Fix documentation comments

* Fix clang-tidy and cpplint

* Update README

* Fix clang-tidy

* Fix to_path not being available on linux

* Add roundtrip encoding tests

* style: pre-commit.ci fixes

* Fix pre-commit.ci

* Fix codacy

* Exclude parse_unicode which should not contain a newline from pre-commit

* Remove a test which breaks CI

* Fix build in CI

* Replace broken execute_with tests

* Fix wide string conversions on all systems

* Fix system args on apple

* style: pre-commit.ci fixes

* Fix some includes

* Fix wrong size calculation and comments

* Add guards around codecvt

* Fix _Pragma not recognized on MSVC

* Fix bad macro check

* Fix include

* Fix narrow and widen when codecvt is missing

* Fix some weird bug in old MSVC

* Add dependent applications to meson-build

* Fix precompilation

* Fix lint

* Fix coverage

* Update README

* style: pre-commit.ci fixes

* Fix lint

* Fix coverage

* Fix optional braces offending clang

* Remove copied comments from Windows.h

* Suppress flawfinder detects

* Fix cmake config tests failing because of a missing lib

* chore: update copyright on new files to 2023

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* style: pre-commit.ci fixes

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-01-12 15:03:20 -05:00
Philip Top
4c7c8ddc45
feat: dot notation (#789)
* Allow using dot notation for subcommand arguments  such as --sub1.field

* add tests for dot notation for subcommands

* style: pre-commit.ci fixes

* add test for short form arguments in dot notation

* style: pre-commit.ci fixes

* add _pre_parse_callback_ support using dot notation

* style: pre-commit.ci fixes

* update cmake tests to include 3.24

* change line endings

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-04 10:05:40 -05:00
polistern
d3505540e7
feat: added usage message replacement feature (#786)
* fix: show newline before footer only if footer is set and not empty

* feat: added usage message replacement feature

* fix: tests corrected for new help message formatting
2023-01-04 10:04:54 -05:00
Philip Top
39a5f1981e
chore: update copyright year to 2023 (#825) 2023-01-03 17:29:37 -05:00
Volker Christian
082dbf0e6e
Print help message for the last parsed subcommand (#822)
Co-authored-by: Philip Top <phlptp@gmail.com>
2023-01-02 07:14:19 -08:00
captainurist
3897109e51
Using ADL everywhere for lexical_cast (#820)
* Using ADL everywhere for lexical_cast

* Fixes in docs

* Add a test for old extension mechanism

* style: pre-commit.ci fixes

* Make gcc happy

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
2023-01-02 07:09:27 -08:00
Philip Top
71755e4f67
tweak the parsing of files for flags with disable_flag_override (#800)
* tweak the parsing of files for flags with disable_flag_override, basically allow true as a valid value to be interpreted as the default in that case

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-30 15:43:25 -08:00
Ryan Sherlock
8f8344bff8
fix: make_description min option output (#808)
Include spacing between the number of minimum options required and the rest of the description.
2022-11-30 11:31:11 -08:00
polistern
e2270dd6f8
fix: fixed footer newline behavior (#796)
* fix: show newline before footer only if footer is set and not empty

* chore: tests corrected for new help message formatting.
2022-10-28 21:15:18 -04:00
Philip Top
25274e2c7b
fix: missing function definition (#793)
* the get_option_group definition was missing from the splitting of the calls.

* style: pre-commit.ci fixes

* the get_option_group definition was missing from the splitting of the calls.

* style: pre-commit.ci fixes

* add test for missing function

* style: pre-commit.ci fixes

* add test for get_option_group

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-28 09:57:54 -04:00
Philip Top
4dbe4b4ec4
tests: add a few more coverage tests (#794)
* add a few more coverage tests

* style: pre-commit.ci fixes

* try to fix pre-commit issues

* update mdlint style as a test

* style: pre-commit.ci fixes

* fix test

* switch test to not generate warning

* add a few more tests

* tweak the conanfile and appveyor to debug issue

* update tests

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-28 00:23:22 -04:00
Philip Top
fd30b5989f
fix: improve some confusing error situations with config files (#781)
* add some more tests for coverage and fix some confusing error situations with config files.

* style: pre-commit.ci fixes

* fix warning

* ci: fix coverage

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2022-09-29 11:48:03 -04:00
Philip Top
dcbcb4721d
fix: negated flag config files (#775)
* add some coverage tests, and fix the issue with negated flags and config files

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-14 10:45:22 -04:00
pre-commit-ci[bot]
d3a8dfb065 style: pre-commit.ci fixes 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
7a7e0822dd [precompile] Split Validators.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
4048596250 [precompile] Split StringTools.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
d1f0f483da [precompile] Split Split.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
c24bf75413 [precompile] Split Formatter.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
003e82579e [precompile] Split Config.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
3e5173d468 [precompile] Split Option.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
b56ae237e5 [precompiled] Initial proof-of-concept with App.cpp
- Add C11_COMPILE cmake option that creates a static lib instead of header-only
- Add C11_INLINE macro that depends on C11_COMPILE
- Split App.hpp into App.hpp and impl/App_inl.hpp
- Add App.cpp that compiles App_inl.hpp into an object file
- CMake modifications to handle impl headers differently for sinlge-header, headers-only, and compiled versions
2022-08-23 11:42:02 -04:00