Releases: kioz-wang/zargs
Releases · kioz-wang/zargs
v0.14.8
What's Changed
- API
exit
and exitf
- very useful in callback function (See zpacker)
- rename in
Arg
raw_choices
to rawChoices
- export modules:
fmt
, par
- remove
parseAny
, use @import("par").any
instead
- rename in
Command
setConfig
to config
usage
to usageString
help
to helpString
- Feature
- support
Vector
type
- colorful usage and help message
Full Changelog: v0.14.7...v0.14.8
v0.14.7
- CI: support multiple platforms
- Fix: don't free memory of
[]const u8
literal set by .default
call
v0.14.6
Feature:
- support to alias for short and long prefix of options (call
.short
or .long
multiple times)
- support to alias for command (call
.alias
)
.callBack
of command would return Self
instead (this is more friendly)
- support to set
TokenIter
's config from command (call .setConfig
, see examples/ex-05.custom_config.zig)
- show all of enum literal in certain cases
Fix:
- remove
.strip = true
from build.zig
v0.14.5
- BugFix: 对解析后的值,检查是否在
choices
和 ranges
的并集中
- Bug: 当确认值不在
ranges
中后,就不再检查 choices
了
- Feature:
raw_choices
将在解析前检查原始字符串
- README: 新增了一个 gif
v0.14.4
- 现在可以为参数(
arg
)配置 ranges
和 choices
- 优化了 help 的格式,现可显示默认值和取值范围
- 单参数选项(
singleArgOpt
)和单位置参数(singlePosArg
),现可配置为可选类型(?T
)
v0.14.3
- 简化 APIs,
parse
方法将在内部使用用完即销的系统迭代器(减少使用者心智负担)
- 更新 README,增加版本号说明
Meta
增加别名为 Arg
,便于使用者理解
v0.14.2
- [API] 实现链式调用 APIs,且原有 APIs 风格保留
- [Build][examples] 简化 step 名
- [Fix] 修复
parseAlloc
后资源无法完全释放的问题
- [Misc] 优化 Usage 和 Help 格式化
- [Misc] 优化编译时和运行时错误日志
v0.14.1
- Fix: remove warn when build from
zig fetch
v0.14.0
- Bugfix: adapted to Zig 0.14.0
- Feature: support to set
callBackFn
for the Command
- Typo: correct "destory" to "destroy"
- API: rename
Iter
to TokenIter
; public parser.any
as parseAny
v0.13.1
- pub
parser
type, its any
function is very useful
- keep debug status when
reinit
a token iter
- fix
nextAllBase
losing the first remaining token
- improved examples' build
