Commit Graph

76 Commits

Author SHA1 Message Date
Martchus db46948f2f Apply clang-format 2017-05-04 22:44:15 +02:00
Martchus 59e20b1043 Apply clang-format 2017-05-01 03:13:11 +02:00
Martchus 91e5a8b0b0 Show version of used libraries in --help
* Include only own libraries and Qt 5 modules
  so far
* First step to implement
  https://github.com/Martchus/tageditor/issues/13
2017-04-15 01:10:38 +02:00
Martchus 7c189b18e1 Allow nested operation arguments
eg. syncthingctl pwd rescan
2017-04-06 00:04:30 +02:00
Martchus 864605f5c8 Only assert unique names within same level
It might make sense to 'hide' arguments from
higher level if those wouldn't be combinable
anyways.
2017-04-06 00:01:56 +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 71231c29da Fix behavior on empty completion request 2017-04-05 22:56:01 +02:00
Martchus 89e79275e0 Ensure the console prompt is shown when app terminates 2017-03-22 02:35:28 +01:00
Martchus 5dac8fc76b Improve startConsole()
* Also try to allocate new console
* Don't set buffer info (seems to have not
  effect anyways)
2017-03-22 02:09:27 +01:00
Martchus 9a395a45d3 Fix convertArgsToUtf8() 2017-03-22 00:59:34 +01:00
Martchus 0327049b99 Don't compare signed and unsigned 2017-03-20 23:00:23 +01:00
Martchus f626bdf9c7 Fix typos 2017-03-01 18:18:54 +01:00
Martchus c4d73b0d7d Use C++14 string literal 2017-02-06 18:32:27 +01:00
Martchus 06af1c4a73 Use std::make_unique provided by C++14 2017-02-05 21:00:52 +01:00
Martchus 1ace53533a string builder: Remove unused code 2017-01-30 00:40:31 +01:00
Martchus 33d368397f Make use of newly introduced string builder 2017-01-27 18:51:54 +01:00
Martchus 1bff266fa9 Add missing #endif in platform detection 2017-01-14 02:24:36 +01:00
Martchus c4ed080b34 Fix platform detection
* Consider macOS a UNIX system
* Remove compiler conditions for PLATFORM_MAC
2017-01-14 00:29:43 +01:00
Martchus 737f73e71a Make forcing UTF-8 codepage optional 2016-12-24 16:08:09 +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 59a8dfe833 Convert args to UTF-8 under Windows 2016-12-19 23:44:34 +01:00
Martchus 89cb027786 Ensure console output is UTF-8 under Windows 2016-12-19 23:43:24 +01:00
Martchus 82b5bf3f1d Fix Bash completion when last pre-defined value matches 2016-11-26 00:14:45 +01:00
Martchus 70869f24a8 Add method to reset arguments recursively 2016-11-26 00:11:48 +01:00
Martchus 9f3ca443e4 Make ArgumentParser::verifyArgs() more strict 2016-11-15 22:02:40 +01:00
Martchus bbb884da30 Don't imply args which can't be combined
Leads to more useful error messages if an unknown
argument has been specified.
2016-11-15 21:44:23 +01:00
Martchus 4c0a1d1169 Fix minor mistake in argument parser 2016-11-14 22:38:21 +01:00
Martchus a1189d3c3b Allow specifying custom exit() function 2016-10-30 00:37:28 +02:00
Martchus 438ca48cbb Improve doc 2016-10-30 00:30:54 +02:00
Martchus 5119bb5c6a Improve ArgumentParser::readSpecifiedArgs()
- Fix minor issues
- Add further test cases
2016-10-29 23:54:30 +02:00
Martchus 72426e2d4c Fix bash completion when dir/file contains single quote
Also a few other improvements in bash completion code
2016-10-22 20:52:08 +02:00
Martchus 4c40004f0b Improve CLI utils
- Add ArgumentParser::readArgs()
- Add Indentation
- Fix eraseLine()
2016-10-02 21:53:58 +02:00
Martchus 4829aa40b9 Fix mistakes in doc 2016-09-17 11:44:49 +02:00
Martchus 79caa5f3ea Improve platform detection 2016-09-10 16:00:20 +02:00
Martchus d6b08b8ed9 Fix decoration for static builds
- Also add improvemnts a few other things in the build system
2016-08-29 15:35:48 +02:00
Martchus fe4e4b2ef5 Fix issues concerning building/using static libraries
- Ensure static versions of 3rd party libs are
  found correctly
- Link tests against statically if only static
  libraries have been built
- Ensure standard lib is linked statically when
  static linkage is enabled
2016-08-19 16:14:55 +02:00
Martchus ed527021f9 Improve logging when testing applications 2016-08-05 01:43:46 +02:00
Martchus df8d942e1c Improve argument parser
- Fix completion of values already containing '='
- Fix completion when current word contains '='
- Improve formatting of help
- Fix typo
2016-07-31 23:20:31 +02:00
Martchus a3e9174476 Remove findArg 2016-07-17 01:27:42 +02:00
Martchus 23346e1a8e Add convenience method to get first value 2016-07-17 01:26:34 +02:00
Martchus 3ead704f1d Improve DECLARE_ENUM macro
- DECLARE_ENUM now declares a regular enum.
- DECLARE_ENUM_CLASS declares an enum class.
- Macros don't include a trailing ';' so they
  can also be used when defining an enum.
2016-07-11 21:32:20 +02:00
Martchus d749ba7cc2 Provide complete occurance info (callbacks) 2016-07-04 23:18:49 +02:00
Martchus 03094a1f61 Add support for bash completion 2016-07-04 02:46:54 +02:00
Martchus b46164e893 Document enum class Response 2016-07-02 02:02:47 +02:00
Martchus b6f784f00e Add macro for fallthrough in switch-case 2016-07-02 02:02:11 +02:00
Martchus e6dfe28149 Skip empty args 2016-06-23 22:06:59 +02:00
Martchus 8bcf8cd008 Check for siblings of parent args 2016-06-23 00:58:43 +02:00
Martchus a3648963ee Make argv const 2016-06-17 17:55:09 +02:00
Martchus 783121ed5e Allow implicit usage of arg only once 2016-06-14 23:11:13 +02:00