Adds @ComixHe as a contributor for code.
This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1132#issuecomment-2702742598)
[skip ci]
---------
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Adds @gblanco92 as a contributor for code.
This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1129#issuecomment-2694425412)
[skip ci]
---------
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
update readme, changelog, and version for 2.5 release
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
Adds @jmarrec as a contributor for code.
This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682507198)
[skip ci]
---------
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
Adds @nshaheed as a contributor for platform.
This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682506808)
[skip ci]
---------
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
Adds @j-rivero as a contributor for platform.
This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682497166)
[skip ci]
---------
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
Adds @krico as a contributor for code.
This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682503164)
[skip ci]
---------
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Adds @jsoref as a contributor for doc.
This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682493678)
[skip ci]
---------
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Adds @LostInCompilation as a contributor for code.
This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1121#issuecomment-2682455232)
[skip ci]
---------
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
This has been bounced around for a couple years now
#474 and a few others have expressed desire to work with non-standard
option names. We have been somewhat resistant to that but I think it can
be done now. This PR adds a modifier `allow_non_standard_option_names()`
It is purposely long, it is purposely off by default. But what it does
is allow option names with a single `-` to act like a short option name.
With this modifier enabled no single letter short option names are
allowed to start with the same letter as a non-standard names. For
example `-s` and `-single` would not be allowed.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
Add modifier for subcommands to restrict subcommands falling through to
parent.
This will resolve#1022
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This is the next phase of the fuzzer. It runs a round trip and makes
sure that the config files generated by the app will load into the same
results, to test full round trip on the config files.
Issues fixed
- fix a bug in the string escape code caught by initial round trip tests
- resolve inconsistencies in handling of {} for empty vector indication
between config and cli parsing
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Greetings, fellow CLI11 community!
We have just added the latest version of cli11 to [Conan
Center](https://conan.io/center/recipes/cli11?version=2.4.2) and thought
it would be a nice addition to include instructions on how to install
CLI11 via Conan in the book folder.
Please let me know if this is okay, or if you would prefer it placed
elsewhere.
**UPDATE**: Some extra information to be more clear about the used
command line and links:
I did not mention how to install/configure Conan, because both links to
conan.io and conan-center-index has all Conan documentation updated. For
instance: https://conan.io/downloads
The latest version of CLI11 available in Conan Center is 2.4.2:
- https://conan.io/center/recipes/cli11?version=2.4.2
or, can be found by running the conan command:
conan search "cli11"
The command `conan install --requires="cli11/[*]" --build=missing`
means:
* conan install: Install a package from a remote. By default, it points
to the official Conan Center
* --requires="cli11/[*]": Install the latest version of CLI11 available
in Conan Center
* --build=missing: In case not finding a pre-built package compatible,
build it from source then.
Regards!
---------
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Fix docstring related to #1052
Fix config_to_string with defaults #1007
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This PR adds a mechanism to hide groups but have their options visible
as part of the parent.
This works for option group names starting with a '+'
for example
```
CLI::App app;
bool flag = false;
std::optional<bool> optional_flag = std::nullopt;
app.add_option("--tester");
auto *m1=app.add_option_group("+tester");
m1->add_option("--flag", flag, "description");
m1->add_option("--optional_flag", optional_flag, "description");
CLI11_PARSE(app,argc, argv);
```
will produce help as
```txt
Options:
-h,--help Print this help message and exit
--tester
--flag BOOLEAN description
--optional_flag BOOLEAN description
```
instead of
```
Options:
-h,--help Print this help message and exit
--tester
[Option Group: tester]
Options:
--flag BOOLEAN description
--optional_flag BOOLEAN description
```
Fixes issue #1034 and a few other past issues or questions
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Prepare for release.
---------
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: Philip Top <phlptp@gmail.com>
Update the Readme and the changelog in preparation for a release.
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <henry.fredrick.schreiner@cern.ch>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
The bot isn't working and we've not really been keeping this up. This is
everything from `yarn run all-contributors check`.
- 📝 Add @dherrera-fb as a contributor
- 📝 Add @VolkerChristian as a contributor
- 📝 Add @thewtex as a contributor
- 📝 Add @polistern as a contributor
- 📝 Add @andreasxp as a contributor
- 📝 Add @SherlockInSpace as a contributor
- 📝 Add @Krzmbrzl as a contributor
- 📝 Add @RangeMachine as a contributor
- 📝 Add @ptheywood as a contributor
- 📝 Add @peterh as a contributor
- 📝 Add @PeteAudinate as a contributor
- 📝 Add @captainurist as a contributor
- 📝 Add @djerius as a contributor
- 📝 Add @shameekganguly as a contributor
- 📝 Add @ayum as a contributor
- 📝 Add @BenjaminBeichler as a contributor
- 📝 Add @DarkWingMcQuack as a contributor
- 📝 Add @eli-schwartz as a contributor
- 📝 Add @bruxisma as a contributor
- 📝 Add @j-rivero as a contributor
- 📝 Add @looopTools as a contributor
- 📝 Add @cetius as a contributor
- 📝 Add @nathanielhourt as a contributor
Update some documentation and add a string escape transformer so escaped
strings can be handled on the command line as well as in the config
files.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
A fairly new addition to GitHub Flavored Markdown.
---------
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: Philip Top <phlptp@gmail.com>
Based on Issue #931 and #942.
Add an example of how to do what those issues were requesting.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Fixes#845 as discussed.
Comparing the two approaches of getting `argv`:
1. The "old" way, through `CLI::argv()`:
✔️ Works automatically and almost everywhere
❌ Small abstraction overhead on macOS
❌ Does not work in weird edge-cases such as missing `/proc`
2. This PR, through `app.ensure_utf8`:
✔️ True zero-overhead abstraction: you don't pay for what you don't use
✔️ Less moving parts than the "old" approach, probably can't be broken
❌ Requires extra code to be written by the user (which is sad because
ideally everyone should use this by default)
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This PR includes updates from #774 and #613.
It updates the readme and docbook with some additional installation
instructions.
---------
Co-authored-by: Owen Parkins <oparkins@users.noreply.github.com>
Co-authored-by: Mengna Li <Adela0814@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Update some doc strings and error output for clarity
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Adds @trokhymchuk as a contributor for code.
This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/893#issuecomment-1610366995)
[skip ci]
---------
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
* 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>
* 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>
* 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
* 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>
* Update readme and changelog and version number
* style: pre-commit.ci fixes
* fix missing references
* style: pre-commit.ci fixes
* merge in changes from non existent 2.1.3 patch release
* Update CHANGELOG.md
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
Co-authored-by: Henry Schreiner <henry.fredrick.schreiner@cern.ch>
* add a counting flag to address and issue with optional<bool> and make the flags more consistent
* move the add_flag to a single operation and add a Sum multi option policy
* style: pre-commit.ci fixes
* remove sum_flag_vector overloads
* style: pre-commit.ci fixes
* add limits include
* style: pre-commit.ci fixes
* fix some other warnings
* update docs describing the multi_option_policy
* Apply suggestions from code review
Co-authored-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>
* add tests which suppose to pass
* Update ConfigFileTest.cpp
* Update ConfigFileTest.cpp
* style: pre-commit.ci fixes
* add the possibility for an empty vector result if allowed.
* style: pre-commit.ci fixes
* add empty vector command line tests
* update book and readme
* add no default test
Co-authored-by: puchneiner <90352207+puchneiner@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add a transform/validator that checks for files on a default path.
* update docs and add tests and capability of chaining the FileOnDefaultPath transform
* style: pre-commit.ci fixes
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* add test of "or" operation and few doc additions
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* add an option to validate optional arguments like in a vector. This can resolve some issues with separating positionals from vector arguments
* style: pre-commit.ci fixes
* add some updates to the book
* style: pre-commit.ci fixes
* fix some precommit issues
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>