Skip to content

Releases: kioz-wang/zargs

v0.14.8

29 Jul 18:06
a2dee76
Compare
Choose a tag to compare

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

18 Apr 15:59
bdc099e
Compare
Choose a tag to compare
  • CI: support multiple platforms
  • Fix: don't free memory of []const u8 literal set by .default call

v0.14.6

05 Apr 18:29
106dbdd
Compare
Choose a tag to compare

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

28 Mar 09:04
f8f05b5
Compare
Choose a tag to compare
  • BugFix: 对解析后的值,检查是否在 choicesranges 的并集中
    • Bug: 当确认值不在 ranges 中后,就不再检查 choices
  • Feature: raw_choices 将在解析前检查原始字符串
  • README: 新增了一个 gif

v0.14.4

26 Mar 18:16
a10cba9
Compare
Choose a tag to compare
  • 现在可以为参数(arg)配置 rangeschoices
  • 优化了 help 的格式,现可显示默认值和取值范围
  • 单参数选项(singleArgOpt)和单位置参数(singlePosArg),现可配置为可选类型(?T

v0.14.3

19 Mar 07:23
657e012
Compare
Choose a tag to compare
  • 简化 APIs,parse方法将在内部使用用完即销的系统迭代器(减少使用者心智负担)
  • 更新 README,增加版本号说明
  • Meta 增加别名为 Arg,便于使用者理解

v0.14.2

19 Mar 04:49
3aa4dbc
Compare
Choose a tag to compare
  • [API] 实现链式调用 APIs,且原有 APIs 风格保留
  • [Build][examples] 简化 step 名
  • [Fix] 修复 parseAlloc 后资源无法完全释放的问题
  • [Misc] 优化 Usage 和 Help 格式化
  • [Misc] 优化编译时和运行时错误日志

v0.14.1

12 Mar 07:02
dac4c95
Compare
Choose a tag to compare
  • Fix: remove warn when build from zig fetch

v0.14.0

12 Mar 06:30
09a5bab
Compare
Choose a tag to compare
  • 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

07 Mar 15:39
Compare
Choose a tag to compare
  • 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

image