Martchus
d76d78ae71
Fix childs -> children
2019-12-30 22:52:23 +01:00
Martchus
23b774e374
Update ArgumentParser::parseArgs()/readArgs() documentation
2019-09-14 20:53:25 +02:00
Martchus
9cc6be4d4c
Suppress "Available top-level options:" if none available
2019-09-14 20:52:35 +02:00
Martchus
ecdebebab8
Exclude private structs from documentation
2019-09-04 18:51:17 +02:00
Martchus
ae2f25f3f4
Use consistent include guards for application utilities
2019-09-04 18:45:48 +02:00
Martchus
b693c72eb1
Fix old namespaces being mentioned in the documentation
2019-09-04 18:45:28 +02:00
Martchus
43d2d280e1
Fix Bash completion for dirs when not using actual dir
2019-09-04 18:26:37 +02:00
Martchus
780ba7bc18
Show description in --help
2019-07-22 18:17:39 +02:00
Martchus
eb34ce610d
Add domain to ApplicationInfo
2019-07-20 20:57:56 +02:00
Martchus
1be20da35a
Make use of std::filesystem optional
...
It is not available under Android yet and only used for
Bash completion. So make it optional to support Android by
disabling that part of the Bash completion which is not
useful under Android anyways.
2019-07-02 18:40:25 +02:00
Martchus
f098a83a18
Fix namespace in Windows-specific macros
2019-06-20 22:55:29 +02:00
Martchus
fd531bdd6a
Prefix most of the macros in global.h
2019-06-12 20:34:25 +02:00
Martchus
4e2539548d
Remove FALLTHROUGH macro
...
Since this is requiring C++17 anyways there's no need for
it anymore.
2019-06-12 20:33:43 +02:00
Martchus
b48b2f5c06
Have everything in one top-level namespace
2019-06-10 21:56:46 +02:00
Martchus
d9e498ba79
Remove DECLARE_ENUM and DECLARE_ENUM_CLASS
...
lupdate seems to be fixed since quite a while now.
2019-06-10 16:20:56 +02:00
Martchus
4c1b733290
Rework ArgumentParser::parseArgs()
...
* Remove "ext()" and "orExit()" versions
* Exit by default (might be intrusive but it is the most
common use)
* Rename Failure to ParseError
2019-06-10 16:03:27 +02:00
Martchus
1ad90eb770
Use std::filesystem in argumentparser.cpp
2019-06-05 23:49:35 +02:00
Martchus
6d2544b908
Return argument parents by reference
2019-06-04 19:08:46 +02:00
Martchus
6e75a293a8
Use override in Failure
2019-05-13 22:41:43 +02:00
Martchus
02bd9f7c06
Add new fields to ApplicationInfo
2019-05-05 18:35:40 +02:00
Martchus
b0b92ff1bf
Allow marking argument as deprecated
2019-05-04 23:14:43 +02:00
Martchus
6d4e13f2dc
Use struct to store global application info
2019-05-04 22:49:57 +02:00
Martchus
80fba8b6d4
Reduce indentation in argumentparser.cpp
2019-05-04 22:35:00 +02:00
Martchus
04a8ef02d5
Remove deprecated dependencyVersions
2019-05-04 21:44:25 +02:00
Martchus
497826f634
Prevent warnings in argumentparser{,tests}.cpp
2019-05-04 21:44:25 +02:00
Martchus
151a3ae9e5
Apply clang-format
2019-05-04 20:58:23 +02:00
Martchus
e9cc26478b
Don't mix building static and shared libraries
2019-04-22 20:42:48 +02:00
Martchus
6d7a6ab735
Don't pretent to add arguments implicitely
2019-04-13 20:33:39 +02:00
Martchus
cfdfc302db
Use exit function passed to argument parser
2019-04-13 20:33:39 +02:00
Martchus
57c896b547
Store boolean properties of Argument as flags
2019-04-13 20:33:39 +02:00
Marius Kittler
a7926951cb
Make firstPresentUncombinableArg() private
2019-04-13 20:33:39 +02:00
Martchus
f40a800107
Remove USE_NOTHROW and make ConversionException inline
2019-04-13 20:33:39 +02:00
Martchus
bc8ea407bc
Prevent use of static variables in ArgumentParser
...
Have --no-color and --help added by default rather
so argument parser is in control over them and don't
has to use static functions.
2019-04-13 20:33:39 +02:00
Martchus
115426c1bc
Fix linking test target against static library
2019-04-13 20:31:40 +02:00
Martchus
517ef59e14
Prevent livetime issue in ArgumentValueConversionError
...
Breaking API/ABI is ok since this is part of experimental
ValueConversion namespace.
2018-10-03 22:40:04 +02:00
Martchus
25ef4e28a2
Make tests compile under Windows
2018-09-30 13:55:30 +02:00
Martchus
3d3378c878
Improve experimental value conversion for arg parser
...
* Fix issues and handle conversion errors
* Add tests
2018-09-22 17:04:23 +02:00
Martchus
651720552e
Replace typedef's with using
...
* Except in code which will be discarded in v5 anyways
* Should not affect source and binary compatibility
2018-09-22 16:41:33 +02:00
Martchus
89a4c2f33a
Skip suggestions for pre-defined values if none assigned
2018-05-11 18:13:14 +02:00
Martchus
b69b841fa3
Prevent huge memory allocation for Damerau-Levenshtein algo
2018-05-11 16:15:16 +02:00
Martchus
5e8d8cb7d1
Show dashes in suggestions
2018-05-11 16:15:02 +02:00
Martchus
24720bbbc1
Fix passing cursor position to findSuggestions()
2018-05-11 15:51:30 +02:00
Martchus
5eb3e2aa75
Fix suggestion if only one available
2018-05-11 15:29:10 +02:00
Martchus
f0b777207e
Fix dependency version under GCC 8
2018-05-08 00:35:41 +02:00
Martchus
8ef92cbf47
Use Levenshtein algo to provide suggestions if arg not found
2018-05-07 21:59:23 +02:00
Martchus
44f0206a13
Refactor ArgumentReader::read()
...
* Use return-code for error handling
* Improve documentation/comments
* Improve const correctness
2018-05-07 20:04:30 +02:00
Martchus
0e8dcbecae
Refactor value completion in ArgumentParser::printBashCompletion()
2018-05-06 00:36:37 +02:00
Martchus
872ee49979
Refactor ArgumentParser::printBashCompletion()
2018-05-06 00:26:42 +02:00
Martchus
94e76f5a1a
Add experimental methods to convert argument values
...
* Currently lacks error handling
* Needs testing
2018-04-28 13:07:48 +02:00
Martchus
c8bf068e74
Reorder method declarations in Argument and ArgumentParser
...
So it becomes clear which parts might be moved to a separate class
to prevent Argument from becoming to big.
2018-04-28 12:08:12 +02:00