github zig-clap镜像仓库
Go to file
2018-06-08 13:45:13 +02:00
src Removed the settings param 2018-06-08 13:45:13 +02:00
tests Removed the settings param 2018-06-08 13:45:13 +02:00
.gitattributes Refactored clap to use inline loops where possible. 2018-03-14 21:36:50 +01:00
.gitignore Added command line argument parser. 2018-03-14 14:15:24 +01:00
build.zig Removed the settings param 2018-06-08 13:45:13 +02:00
index.zig Started work on the proper structure for the lib 2018-05-31 16:00:44 +02:00
LICENSE Initial commit 2018-03-14 14:06:17 +01:00
README.md Removed false or none tested advertisement from README 2018-05-20 01:23:43 +02:00

zig-clap

An easy to use command line argument parser library for Zig.

Features

See example.

  • Assosiate arguements with fields of a struct.
    • When an arguement is found by the clap, the field is set to a parsed version of the value.
    • zig-clap provides some default parses, but you can make your own as well.
  • Short arguments -a
    • Chaining -abc where a and b does not take values.
  • Long arguments --long
  • Supports both passing values using spacing and = (-a 100, -a=100)
    • Short args also support passing values with no spacing or = (-a100)
    • This all works with chaining (-ba 100, -ba=100, -ba100)