Martchus
b3ebe5ce38
Fix typos found via `codespell --skip .git -w`
2021-07-03 19:07:49 +02:00
Martchus
f30947cc75
Fix plural of parameter
2021-03-30 20:48:05 +02:00
Martchus
940593429a
Allow ArgumentParserTests to pass when working dir present within testfiles dir
2020-06-16 01:03:39 +02:00
Martchus
a841d764d5
Use override in test fixtures
2019-10-13 18:27:41 +02:00
Martchus
389a0ef4da
Apply clang-format
2019-07-26 22:01:25 +02:00
Martchus
780ba7bc18
Show description in --help
2019-07-22 18:17:39 +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
b48b2f5c06
Have everything in one top-level namespace
2019-06-10 21:56:46 +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
83b7658b04
Add test for Bash completion of directory names
2019-06-05 23:49:53 +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
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
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
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
8e32fc0229
Apply clang-format
2018-10-06 16:18:53 +02:00
Martchus
5356d793fc
Make all tests pass under Windows
...
* Workaround some issues
* Disable some tests (better than not running tests
at all)
2018-10-03 22:37:55 +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
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
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
368fc46e47
Improve tests of argument parser
2018-01-29 16:23:10 +01:00
Martchus
ff5eb6c7c9
Do not show help for --help
2018-01-28 00:43:03 +01:00
Martchus
09f9181281
Split operations from other top-level args in --help
2018-01-28 00:38:05 +01:00
Martchus
a3192a1113
Fix parsing top-level argument after abbreviation
2017-11-29 22:52:50 +01:00
Martchus
4e4e13e4c8
Improve argument parser tests
2017-11-29 20:29:51 +01:00
Martchus
46f652ad00
Improve readability of ArgumentReader::read and use Phrases
2017-10-19 00:51:47 +02:00
Martchus
b4556c0481
Move OutputCheck to its own header file
...
* So it can be used in tests for tageditor and
other applications
* Make it a header-only class so c++utilities
does not depend on cppunit
2017-09-20 17:09:34 +02:00
Martchus
5f14d55f25
Use Argument::varValueCount to fix warnings
2017-09-20 17:07:06 +02:00
Martchus
868162742b
Adjust argument parser tests
2017-09-19 16:02:42 +02:00
Martchus
8bed0adc00
Test printing dependency versions
2017-07-28 20:47:49 +02:00
Martchus
f4faf652fd
Improve argument parser tests
2017-07-28 19:33:55 +02:00
Martchus
d7cf4312bf
bash completion: Fix case when no current word index specified
2017-07-28 18:24:52 +02:00
Martchus
1af88c964e
bash completion: Show values for implicit args
...
So eg. `tageditor get [tab][tab]` also suggests specifying
field names directly instead of only via --fields.
2017-07-28 17:32:16 +02:00
Martchus
4157f8849a
Improve argument parser tests
2017-06-25 16:03:40 +02:00
Martchus
f62ed9f63d
Test HelpArgument
2017-06-25 01:42:38 +02:00
Martchus
db46948f2f
Apply clang-format
2017-05-04 22:44:15 +02:00
Martchus
7c189b18e1
Allow nested operation arguments
...
eg. syncthingctl pwd rescan
2017-04-06 00:04:30 +02:00
Martchus
c30011fe09
Fix missleading error message
...
Unknown arg is treated is causing fatal
error in this case and hence not ignored.
2017-04-05 23:45:56 +02:00
Martchus
c4d73b0d7d
Use C++14 string literal
2017-02-06 18:32:27 +01:00
Martchus
33d368397f
Make use of newly introduced string builder
2017-01-27 18:51:54 +01:00
Martchus
28d2063d33
Fix Bash completion for abbreviations
2016-12-24 16:07:43 +01:00
Martchus
cab332bcad
Refactor reading arguments
...
Replace ArgumentParser::readSpecifiedArgs() with
ArgumentReader class to simplify argument list
2016-12-23 22:40:33 +01:00
Martchus
939a43e348
Clean argument parser tests
2016-12-07 21:06:21 +01:00
Martchus
82b5bf3f1d
Fix Bash completion when last pre-defined value matches
2016-11-26 00:14:45 +01:00