diff options
| author | 2018-11-15 18:44:07 +0100 | |
|---|---|---|
| committer | 2018-11-15 18:44:07 +0100 | |
| commit | 928510dc510aac49f7dbc1f1c8e9f4683ab35d84 (patch) | |
| tree | e33178c707d943e05d885b2d8383c9d8da1b1d77 /example | |
| parent | Renamed helpEx to helpFull and added a new helpEx that wraps helpFull (diff) | |
| download | zig-clap-928510dc510aac49f7dbc1f1c8e9f4683ab35d84.tar.gz zig-clap-928510dc510aac49f7dbc1f1c8e9f4683ab35d84.tar.xz zig-clap-928510dc510aac49f7dbc1f1c8e9f4683ab35d84.zip | |
Changed Names.prefix to Names.both
Diffstat (limited to 'example')
| -rw-r--r-- | example/comptime-clap.zig | 4 | ||||
| -rw-r--r-- | example/streaming-clap.zig | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/example/comptime-clap.zig b/example/comptime-clap.zig index b275dc7..00c2a97 100644 --- a/example/comptime-clap.zig +++ b/example/comptime-clap.zig | |||
| @@ -16,11 +16,11 @@ pub fn main() !void { | |||
| 16 | const params = comptime []clap.Param([]const u8){ | 16 | const params = comptime []clap.Param([]const u8){ |
| 17 | clap.Param([]const u8).flag( | 17 | clap.Param([]const u8).flag( |
| 18 | "Display this help and exit.", | 18 | "Display this help and exit.", |
| 19 | clap.Names.prefix("help") | 19 | clap.Names.both("help"), |
| 20 | ), | 20 | ), |
| 21 | clap.Param([]const u8).option( | 21 | clap.Param([]const u8).option( |
| 22 | "An option parameter, which takes a value.", | 22 | "An option parameter, which takes a value.", |
| 23 | clap.Names.prefix("number"), | 23 | clap.Names.both("number"), |
| 24 | ), | 24 | ), |
| 25 | clap.Param([]const u8).positional(""), | 25 | clap.Param([]const u8).positional(""), |
| 26 | }; | 26 | }; |
diff --git a/example/streaming-clap.zig b/example/streaming-clap.zig index 57ebe71..77d05e2 100644 --- a/example/streaming-clap.zig +++ b/example/streaming-clap.zig | |||
| @@ -10,8 +10,8 @@ pub fn main() !void { | |||
| 10 | 10 | ||
| 11 | // First we specify what parameters our program can take. | 11 | // First we specify what parameters our program can take. |
| 12 | const params = []clap.Param(u8){ | 12 | const params = []clap.Param(u8){ |
| 13 | clap.Param(u8).flag('h', clap.Names.prefix("help")), | 13 | clap.Param(u8).flag('h', clap.Names.both("help")), |
| 14 | clap.Param(u8).option('n', clap.Names.prefix("number")), | 14 | clap.Param(u8).option('n', clap.Names.both("number")), |
| 15 | clap.Param(u8).positional('f'), | 15 | clap.Param(u8).positional('f'), |
| 16 | }; | 16 | }; |
| 17 | 17 | ||