1407 Commits

Author SHA1 Message Date
allcontributors[bot]
b874409ff0 📝 Add mochaaP as a contributor for platform (#1281)
Adds @mochaaP as a contributor for platform.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1280#issuecomment-3761350721)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2026-01-16 17:39:39 -08:00
Zephyr Lykos
f0eddc8dc5 Refactor meson build system (#1280)
- Bump meson version to 1.3
- Bump default cpp_std (required by Catch2 3.x, still possible for c++11
fallback)
- Move option `single-file-header` and `precompiled` to `mode`
- Make pkgconfig optional
- Refactor tests, fix a bizzare situation where filename contains quote
  or escape characters
2026-01-16 17:39:24 -08:00
Neeraj611
aa5360b9ea fix: resolve C++26 template ambiguity for std::complex (#1278)
In C++26, std::complex gained a tuple interface (P2819R2), causing
template specialization ambiguity in type_count and type_count_min.

This change explicitly excludes is_complex from tuple-like template
specializations, ensuring complex types are handled only by their
dedicated specializations.

Fixes #1098

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-02 10:07:31 -08:00
Philip Top
20e9132dfc Extras configuration (#1270)
Allow more control over how extras are interpreted. Specifically
allowing some assumptions to be made about arguments to unrecognized
options. With `CLI::ExtrasMode::AssumeMultipleArguments` all positional
arguments following an unrecognized option will be considered extra as
well even if there are open positional arguments. With
`CLI::ExtrasMode::AssumeSingleArgument` a positional argument following
an unrecognized option will also be considered unrecognized and go into
the `remaining()` bin.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-02 10:05:46 -08:00
allcontributors[bot]
457839d482 📝 Add jaefunk as a contributor for doc (#1276)
Adds @jaefunk as a contributor for doc.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1275#issuecomment-3694056410)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-12-27 10:00:03 -08:00
jaefunk
f8ece0c65d docs: fix typos in README (#1275)
This PR corrects minor typos in the README documentation.
2025-12-27 09:59:44 -08:00
allcontributors[bot]
fc126de5f7 📝 Add The0Dev as a contributor for code (#1274)
Adds @The0Dev as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1273#issuecomment-3692934734)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-12-27 07:50:33 -08:00
The0Dev
f81db4e692 Fix 'UTF-8 config filenames not supported on Windows' #912 (#1273)
This PR should fix #912
2025-12-27 07:50:17 -08:00
pre-commit-ci[bot]
257c449a6a chore(deps): pre-commit.ci autoupdate (#1271)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v21.1.7 →
v21.1.8](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.7...v21.1.8)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-23 12:15:31 -05:00
Philip Top
fe8f9f7db3 prefix_command tests and improvements (#1266)
adding a PrefixCommandMode option to the prefix_command to allow
specification of a separator and catch other errors

Addresses #1264

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-17 06:26:16 -08:00
Philip Top
6919ea8624 update the azure pipelines to remove deprecated image (#1267)
replace removed azure image and some other CI pipeline updates
2025-12-13 09:34:34 -08:00
pre-commit-ci[bot]
695eff019a chore(deps): pre-commit.ci autoupdate (#1265)
<!--pre-commit.ci start-->
updates:
- [github.com/psf/black-pre-commit-mirror: 25.11.0 →
25.12.0](https://github.com/psf/black-pre-commit-mirror/compare/25.11.0...25.12.0)
- [github.com/pre-commit/mirrors-clang-format: v21.1.6 →
v21.1.7](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.6...v21.1.7)
- [github.com/JoC0de/pre-commit-prettier: v3.7.3 →
v3.7.4](https://github.com/JoC0de/pre-commit-prettier/compare/v3.7.3...v3.7.4)
- [github.com/DavidAnson/markdownlint-cli2: v0.19.1 →
v0.20.0](https://github.com/DavidAnson/markdownlint-cli2/compare/v0.19.1...v0.20.0)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-12 09:02:15 -08:00
pre-commit-ci[bot]
bebc5a72c3 chore(deps): pre-commit.ci autoupdate (#1262)
<!--pre-commit.ci start-->
updates:
- [github.com/JoC0de/pre-commit-prettier: v3.6.2 →
v3.7.3](https://github.com/JoC0de/pre-commit-prettier/compare/v3.6.2...v3.7.3)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-06 19:06:50 -08:00
Philip Top
f10ee369ee Issue #1258 (#1261)
fix an issue where an enumeration with a stream output method would
generate strings that could not be converted back to the original
enumeration value.

Fixes Issue #1258 

recent changes fixed a few issues with the default_val method. The
method used the to_string, which in cases where a user supplied a
streaming operation to enumerations they could not be converted back to
the enumeration properly resulting in some errors and confusing help
output.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-29 05:49:47 -08:00
Philip Top
53608df1bd Module testing (#1255)
Address issue #1254

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2025-11-29 05:49:25 -08:00
pre-commit-ci[bot]
60c518cda8 chore(deps): pre-commit.ci autoupdate (#1260)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v21.1.5 →
v21.1.6](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.5...v21.1.6)
- [github.com/DavidAnson/markdownlint-cli2: v0.19.0 →
v0.19.1](https://github.com/DavidAnson/markdownlint-cli2/compare/v0.19.0...v0.19.1)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-25 05:25:46 -08:00
Philip Top
9b939ae821 add an option for full install, (#1252)
include impl headers with precompiled option.

This may be necessary for some package installs if they wish to include
the precompiled static library alongside the header only install.
inspired by #1198

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-21 06:04:10 -08:00
pre-commit-ci[bot]
98e47b4c53 chore(deps): pre-commit.ci autoupdate (#1256)
<!--pre-commit.ci start-->
updates:
- [github.com/DavidAnson/markdownlint-cli2: v0.18.1 →
v0.19.0](https://github.com/DavidAnson/markdownlint-cli2/compare/v0.18.1...v0.19.0)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-19 04:32:15 -08:00
pre-commit-ci[bot]
7fabe18c24 chore(deps): pre-commit.ci autoupdate (#1253)
<!--pre-commit.ci start-->
updates:
- [github.com/psf/black-pre-commit-mirror: 25.9.0 →
25.11.0](https://github.com/psf/black-pre-commit-mirror/compare/25.9.0...25.11.0)
- [github.com/pre-commit/mirrors-clang-format: v21.1.2 →
v21.1.5](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.2...v21.1.5)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-11 07:12:01 -08:00
Philip Top
c9921127d7 Update some documentation and book chapters (#1250)
Update documentation related to formatters and some other recent
updates.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-09 05:55:23 -08:00
pre-commit-ci[bot]
e33d09278f chore(deps): pre-commit.ci autoupdate (#1248)
<!--pre-commit.ci start-->
updates:
- [github.com/DavidAnson/markdownlint-cli2: v0.12.0 →
v0.18.1](https://github.com/DavidAnson/markdownlint-cli2/compare/v0.12.0...v0.18.1)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-07 04:03:15 -08:00
Philip Top
3a69ed51c0 option name formatting in help (#1247)
Add some controls to manipulate option string formatting, including
disabling the default values, disabling default flag values, disabling
type names.

Fixes #857

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-03 04:55:14 -08:00
Philip Top
3a1946e965 update precommit markdownlint and add permissions on workflow files (#1246)
test out some precommit hooks and other updates

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-28 07:26:18 -07:00
Philip Top
bfffd37e1f code simplification (#1244)
Based on #1242, I don't think this is required but it does remove that
issue and checking on compiler explore it does simplify the generated
code.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
v2.6.1
2025-10-27 06:17:19 -07:00
Philip Top
8ddadd7cea patch release for recent fixes (#1241)
updates for patch release

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-25 12:53:47 -07:00
Philip Top
8b1d067374 try adding a test for failure with macos arm precompile (#1238)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-24 05:36:00 -07:00
allcontributors[bot]
4d78aa30d6 📝 Add LunarWatcher as a contributor for doc (#1240)
Adds @LunarWatcher as a contributor for doc.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1239#issuecomment-3434894391)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-10-23 04:25:08 -07:00
Olivia (Zoe)
1d94f2bbf9 Fix incorrect links to validator examples (#1239)
8c77664bd0 added the files and the links,
but the links were off by one character and therefore don't work. This
PR fixes them
2025-10-22 20:02:36 -07:00
Philip Top
3914826ef8 Version update (#1219)
update changelog for 2.6 release

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
v2.6.0
2025-10-20 06:07:51 -07:00
Theodor Nesfeldt Engøy
8225a6ad4e ci(cifuzz): keep dry-run until google/oss-fuzz#14131 merges (#1232)
Flip CIFuzz out of dry‑run now that cli11 exists in OSS‑Fuzz.

---------

Co-authored-by: TheodorNEngoy <[email protected]>
2025-10-19 06:11:33 -07:00
allcontributors[bot]
3b84cbae64 📝 Add TheodorNEngoy as a contributor for infra (#1231)
Adds @TheodorNEngoy as a contributor for infra.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1225#issuecomment-3418608931)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-10-18 10:48:50 -07:00
Theodor Nesfeldt Engøy
0c4cd5f079 ci: add CIFuzz (#1225)
Add OSS-Fuzz CIFuzz workflow to run fuzzers on PRs for project 'cli11'.

---------

Co-authored-by: TheodorNEngoy <[email protected]>
2025-10-18 10:48:36 -07:00
Philip Top
16a2840b4e Add CodeQL analysis workflow configuration (#1230)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-18 10:47:57 -07:00
Philip Top
3388e8ea49 Help spacing (#1229)
Fix the help spacing and double printing of footers in certain
circumstances

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-18 08:45:09 -07:00
Volker Christian
0104dceb17 Option callback priority v2 (#1226)
Extension allowing all possible priority combinations.
Add a field callback_priority to OptionBase.

---------

Co-authored-by: Philip Top <phlptp@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-18 06:52:55 -07:00
pre-commit-ci[bot]
a41ba814b3 chore(deps): pre-commit.ci autoupdate (#1220)
<!--pre-commit.ci start-->
updates:
- https://github.com/psf/blackhttps://github.com/psf/black-pre-commit-mirror
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-07 05:48:42 -07:00
Philip Top
e591f4aac5 ensure the parse order is reset on clear() (#1218)
Fixes #1216
2025-10-03 06:08:47 -07:00
pre-commit-ci[bot]
e83695fb10 chore(deps): pre-commit.ci autoupdate (#1215)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v21.1.1 →
v21.1.2](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.1...v21.1.2)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-30 05:05:00 -07:00
pre-commit-ci[bot]
5248d5b352 chore(deps): pre-commit.ci autoupdate (#1210)
<!--pre-commit.ci start-->
updates:
- [github.com/psf/black: 25.1.0 →
25.9.0](https://github.com/psf/black/compare/25.1.0...25.9.0)
- [github.com/pre-commit/mirrors-clang-format: v21.1.0 →
v21.1.1](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.0...v21.1.1)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-23 10:40:30 -07:00
allcontributors[bot]
89dc726939 📝 Add romanholidaypancakes as a contributor for code (#1208)
Adds @romanholidaypancakes as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1206#issuecomment-3292000117)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-09-15 07:34:09 -07:00
romanholidaypancakes
8bc29b83e9 Update App.hpp (#1206)
Compatible compile option: /GR-
2025-09-15 05:52:01 -07:00
Philip Top
be52eb6972 Contrib update (#1205)
update contributors
2025-09-08 05:24:24 -07:00
Philip Top
c8dc5f627a add permission validators as an Extra Validator (#1203)
an update of #250 

Fixes #249

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-08 05:16:49 -07:00
Philip Top
ee326d647b Fuzzer issues (#1202)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-02 07:07:01 -07:00
pre-commit-ci[bot]
dd99ec7752 chore(deps): pre-commit.ci autoupdate (#1201)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v20.1.8 →
v21.1.0](https://github.com/pre-commit/mirrors-clang-format/compare/v20.1.8...v21.1.0)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-02 04:49:34 -07:00
Philip Top
8c77664bd0 move some of the Validators to an ExtraValidators file (#1192)
Rework some of the validator locations, add documentation, and fix some
lingering issues with validators.
The extra will will enable additions of some new validators and reduce
compile times for those that are not needed.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-01 05:13:21 -07:00
Philip Top
1ab8646760 duplicate footer (#1200)
fix an issue with duplicate footers being printed with help_all

Fixes #1183

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-29 12:38:46 -07:00
Philip Top
f7e4695ed8 fix edge case with config files pointer (#1199)
generating a seg fault if no default and no config file provided.

Fixes #1197 

This was likely introduced by the combination of fixes for some issues
with the config parsing and some updates to the as<T> method a while
back. This edge case on the handling of the config pointer with as was
not overlooked in the earlier testing.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-28 17:11:03 -07:00
Philip Top
399e729a55 Fix issue with multiline array interpretation for toml (#1196)
if the first line only contained a single character.

Fixes #1195
2025-08-27 17:40:51 -07:00
Radim Krčmář
e7e8de0346 formatter: add long_option_alignment_ratio (#1185)
The default formatter has hardcoded ratio at which the long options are
aligned. It's currently 1/3 of the column, which makes the default look
awkward:
```
  -h,     --help              Print
          --option            Something
```
A ->long_option_alignment_ratio(6/30.f) allows output to look like this:
```
  -h, --help                  Print
      --option                Something
```
The 1/3 ratio is also bad if you want to print "descriptive" long
options on a single line, because then you might want to increase the
column width, but that means you waste more space on short options.

e.g. ->column_width(46)
```
  -l,          --very-descriptive-long-option  Something
```
vs. ->column_width(38)
```
  -l,       --very-descriptive-long-option
                                      Something
```
vs. ->column_width(38) ->long_option_alignment_ratio(6/38.f)
```
  -l, --very-descriptive-long-option  Something
```
Any absolute offset `X` can be set as `X/column_width`, so provide a
ratio-based interface.

I would have prefered to give an absolute integer offset, but we still
have to preserve the functionality that does 1/3 if user changed
nothing, which means that ratio-based interface is simpler.

I don't have a good idea for the name, "short_option_ratio" might work
as well.
The setter does not sanity check that the value is in [0;1] range.

---------

Signed-off-by: Radim Krčmář <radim@krcmar.dev>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-27 05:17:20 -07:00