Skip to content

Cleaned up several parts of the codebase & Added last minute features#5

Merged
00JCIV00 merged 12 commits intomainfrom
cleanup
Jun 25, 2023
Merged

Cleaned up several parts of the codebase & Added last minute features#5
00JCIV00 merged 12 commits intomainfrom
cleanup

Conversation

@00JCIV00
Copy link
Owner

  • Implemented Delimited Arguments.
  • Cleaned up erroneous Pointer usage.
  • Implemented Managed Commands.
  • Added/Implemented Custom Parsing and Validation Functions along with helper functions for each.
  • Fixed bug in how Values were set.
  • Implemented Abbreviated Long Options.
  • Fixed Windows Compatibility.
  • Cleaned up unneeded @constcast() calls in cova.zig.
  • Added Features section to README.md.

00JCIV00 and others added 12 commits June 21, 2023 15:20
- Removed several erroneous pointers from Command.zig and Option.zig.
- Changed cova.zig to use pointers only where needed.
- Added `global_help_prefix` to set one Help Message Prefix for all Commands of the given type.
- Added `max_args` to set max number of Arguments for `init()` and `from()`.
- Added Managed fields and methods to Command.zig/Custom to allow for a single allocator to be provided during `init()` to be used for the lifetime of the Command.
- Updated cova.zig to check if each Command is initialized before parsing against it.
- Added ValidationFns to Value.zig for common Value validation requirements. These also serve as a template for the simplicity of validation functions.
- Fixed minor initialization issue with auto-generated Usage/Help Commands.
- Added `parse_fn` to Value.zig/Typed to allow for user-provided alternative parsing functions.
- Added ParsingFns to Value.zig for common Value parsing requirements. These also serve as a template for the simplicity of parsing functions.
- Added addtional Functions to Value.zig/ValidationFns.
- Added `sub_descriptions` to Commands.zig/Custom/FromConfig to ingest Key/Value pairs of Argument Names and Descriptions to be used when creating a Command from a Struct.
- Added FromConfig to Option.zig and Value.zig to support the new Descriptions.
- Fixed a bug when setting Multi-Values with `set()` in Value.zig/Typed.
- Added another convenience function to Value.zig/ParsingFns.Builder.
- Updated some comments for consistency.
- Added `allow_abbreviated_long_opts` to cova.zig/ParseConfig.
- Changed the Long Options parsing of `parseArgs()` in cova.zig to accept abbreviations if enabled.
- Fixed potential error with Long Option prefix parsing.
- Added `allow_abbreviated_long_opts` to cova.zig/ParseConfig.
- Changed the Long Options parsing of `parseArgs()` in cova.zig to accept abbreviations if enabled.
- Fixed potential error with Long Option prefix parsing.
- Fixed a compatibility error in the `argsPeak()` function of cova.zig due to a different ArgIterator being used on Windows for utf16 support.
- Removed unneeded `@constCast()` calls for the ArgIterator in cova.zig
- Added Features section to README.md
@00JCIV00 00JCIV00 merged commit beb1842 into main Jun 25, 2023
@00JCIV00 00JCIV00 deleted the cleanup branch June 25, 2023 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments