Riyyi
cb592b8d2c
Manager: Make file syncing logic generic
il y a 4 ans
Riyyi
58bf5b98ee
Manager: Add function to check if file is system type
il y a 4 ans
Riyyi
e7d1515fca
Manager: Add index to dotfile iteration loop
il y a 4 ans
Riyyi
e4d90bf281
Manager: Make the callable functions non-static
il y a 4 ans
Riyyi
7920b7280e
Manager: Add generic dotfile looping
il y a 4 ans
Riyyi
de4b96bd47
Manager: Add Dotfile adding function
il y a 4 ans
Riyyi
f8ccfe79b8
Manager: Add target filtering to Dotfile::list()
il y a 4 ans
Riyyi
1893f08ea8
Manager: Start working on dotfile class
il y a 4 ans
Riyyi
12dd000f0b
Util: Pass string by const reference
il y a 4 ans
Riyyi
6293e2aaf7
Project: Release under MIT license
il y a 4 ans
Riyyi
875a49332c
Test: Add Shell and System test cases
il y a 4 ans
Riyyi
cf1da45b78
Test: Update macro output formatting
il y a 4 ans
Riyyi
cc7252f94d
Util: Change operators to the evaluated order
il y a 4 ans
Riyyi
26ceceeba5
Util: Change System to direct-list-initialization
il y a 4 ans
Riyyi
9926849640
Util: Add class Shell for executing more basic OS shell commands
il y a 4 ans
Riyyi
496e3e4c88
Util: Do not modify the output result
il y a 4 ans
Riyyi
06367a05b8
Util: Add additional System operator support
il y a 4 ans
Riyyi
2fca315557
Util: Add support for stdin and | piping
...
In order to accomplish this, the arguments have to be stored in the
object. Because () evaluation order is not defined in the spec.
Because arguments have to be stored now, char pointers no longer work
and std::strings are stored instead. Systems object also cant be
returned as a reference anymore because you need to be able to know
which is the lhs and which is the rhs in the operator overloads.
il y a 4 ans
Riyyi
70ccdee8c2
Util: Add class System for executing OS shell commands
il y a 4 ans
Riyyi
3efe74582f
Util: Add ArgParser missing argument error message
il y a 4 ans
Riyyi
bb29919f02
Util: Simplify the logic of the long option parsing function
il y a 4 ans
Riyyi
2ac6d24520
Util: Add type error messages to ArgParser option arguments
il y a 4 ans
Riyyi
648c0f8c85
Util: Rename ArgParser error types
il y a 4 ans
Riyyi
35e2c2de48
Util: Rename printOptionError -> printError
il y a 4 ans
Riyyi
ffcde408e1
Util: Add invalid argument type error message to ArgParser
il y a 4 ans
Riyyi
9c918c6555
Util: Add ArgParser unhandled argument error type and messages
il y a 4 ans
Riyyi
a5d5d2ea6d
Util: Fix nullptr derefencing
...
In order to compare strings, the STL has to dereference the data
pointer. So check if its not a nullptr first.
il y a 4 ans
Riyyi
7759821b13
Util: Fix string_view substring selection
...
Unlike std::basic_string::data() and string literals, data() may return
a pointer to a buffer that is not null-terminated. Therefore it is
typically a mistake to pass data() to a routine that takes just a const
CharT* and expects a null-terminated string.
The bug was calling string_view .data() after calling substr() that ends
before the null terminator, as it will just return the entire
string_view.
il y a 4 ans
Riyyi
a217475d42
Util: Avoid assigning variable by passing to the initialization list
...
When an object of a class is created, the constructors of all member
variables are called consecutively in the order the variables are
declared, even if you don't explicitly write them to the initialization
list.
il y a 4 ans
Riyyi
8ce4643518
Test: Add optional argument test cases
il y a 4 ans
Riyyi
b6bfcbdc33
Util: Support for optional arguments in ArgParser
il y a 4 ans
Riyyi
ca95ef1cf1
Util: Add simple validation to ArgParser number conversions
il y a 4 ans
Riyyi
6efa314c38
Util: Move ArgParser private function implementations to the bottom
il y a 4 ans
Riyyi
4e30b58305
Util: Switch ArgParser option/argument creation to list initialization
il y a 4 ans
Riyyi
0fffa86ba0
Util: Deduplicate ArgParser accept value lambdas
il y a 4 ans
Riyyi
9cecb8602f
Util: Add more ArgParser argument types
il y a 4 ans
Riyyi
9796bc9e86
Test: Add argument test cases
il y a 4 ans
Riyyi
67fd31a746
Util: Add argument parsing to ArgParser
il y a 4 ans
Riyyi
952ba588f7
Test: Check non existent arguments
il y a 4 ans
Riyyi
dc4fcc10ce
Util+Test: Implement exit on first error in main ArgParser loop
il y a 4 ans
Riyyi
f021cf0e15
Util: Fix parsing for exit on first error setting
il y a 4 ans
Riyyi
3f1ced53f6
Util: Rename variable to plural
il y a 4 ans
Riyyi
1c887bbaf7
Test: Print expect macros to stderr
...
Also now properly reporting test case failure.
il y a 4 ans
Riyyi
f92b75a463
Util+Test: Add setting to stop parsing on first non-option
il y a 4 ans
Riyyi
a70d67f8fa
Util: Don't try to parse a '--' parameter
il y a 4 ans
Riyyi
072d805344
Util+Test: Add more ArgParser option types
il y a 4 ans
Riyyi
98dec3e51a
Util: Handle accepting values return state in ArgParser
il y a 4 ans
Riyyi
1366bf14b1
Util+Test: Change size_type to size_t
...
The specialized size_type type is just an alias for size_t.
il y a 4 ans
Riyyi
68cdd625b4
Util+Test: Add parsing of multi-value options
il y a 4 ans
Riyyi
a5c422a2cc
Util+Test: Add support for '--' to enable non-option mode
il y a 4 ans