Repository navigation
ArgMojo v0.6.0
20260510 (v0.6.0)
ArgMojo v0.6.0 introduces auto-dispatch for subcommands, improves parser behavior for mathematical-expression tokens, and migrates the codebase to Mojo v1.0.0b1.
⭐️ New in v0.6.0
- Add
allow_negative_expressions()onCommand— treats single-hyphen tokens as positional arguments when they do not conflict with registered short options. Handles mathematical expressions like-1/3*pi,-sin(2), and-e^2. This is a strict superset ofallow_negative_numbers(). This is useful for mathematical tools, e.g., decimo CLI. (PR #52) - Add auto-dispatch —
set_run_function(handler)registers adef(ParseResult) thin raises -> Nonehandler on aCommand;execute()parses and auto-dispatches to the matching handler, eliminating manualif/elifsubcommand chains._execute_with_arguments(args)provides equivalent dispatch for tests with explicit argument lists. Works with nested subcommands, aliases, and persistent flags. (PR #53)
🔄 Mojo v1.0.0b1 migration
- Bump Mojo dependency to
==1.0.0b1inpixi.toml. (PR #54) - Migrate stored function pointers for run handlers to use the
thinfunction effect (def(ParseResult) thin raises -> None). (PR #54) - Add explicit
ImplicitlyDestructiblebounds where required (Defaultable,Movable,Parsablegenerics), because trait hierarchy implications changed. (PR #54) - Replace deprecated
len(String)usage withString.byte_length(). (PR #54) - Replace deprecated reflection helpers (
get_type_name[T](),struct_field_*[T]()) with the unifiedreflect[T]()API. (PR #54)
What's Changed
- [core][declarative] Add compile time validation on flag length, choices, and range by @forfudan in #45
- [test][github] Split the current Github tests into 5 jobs by @forfudan in #46
- [core] Add
preludemodule for convenient import by @forfudan in #47 - [core] Add
allow_negative_expressions()method forCommandby @forfudan in #48 - [core] Add auto dispatch + Extend the
mgitexample by @forfudan in #49 - [core] 80-character help formatting + Fix CJK description issues in zsh and fish by @forfudan in #50
- [example][doc] Split subcommands from
main()into their own buiding functions + Update user manual by @forfudan in #51 - [core] Enhance help and error messages with improved formatting by @forfudan in #52
- [core] Change "arg"/"cmd" to "argument"/"command" + Change "args" from
argvto "tokens" by @forfudan in #53 - [doc] Update the user manual by @forfudan in #54
- [core][doc] Refactor parse-related functions by adding new shared helpers and a unified parse loop + Add a document on parsing algorithm by @forfudan in #55
- [mojo][core] Update the codebase to Mojo v1.0.0b1 by @forfudan in #56
- [doc] Update documents for release by @forfudan in #57
Full Changelog: v0.5.0...v0.6.0