diff options
| author | 2018-11-15 18:44:07 +0100 | |
|---|---|---|
| committer | 2018-11-15 18:44:07 +0100 | |
| commit | 928510dc510aac49f7dbc1f1c8e9f4683ab35d84 (patch) | |
| tree | e33178c707d943e05d885b2d8383c9d8da1b1d77 /README.md | |
| 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 'README.md')
| -rw-r--r-- | README.md | 14 |
1 files changed, 7 insertions, 7 deletions
| @@ -20,8 +20,8 @@ The `StreamingClap` is base of all the other parsers. It's a streaming parser th | |||
| 20 | 20 | ||
| 21 | ```rust | 21 | ```rust |
| 22 | const params = []clap.Param(u8){ | 22 | const params = []clap.Param(u8){ |
| 23 | clap.Param(void).flag('h', false, clap.Names.prefix("help")), | 23 | clap.Param(void).flag('h', false, clap.Names.both("help")), |
| 24 | clap.Param(void).option('n', true, clap.Names.prefix("number")), | 24 | clap.Param(void).option('n', true, clap.Names.both("number")), |
| 25 | clap.Param(void).positional('f'), | 25 | clap.Param(void).positional('f'), |
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| @@ -50,8 +50,8 @@ them available through three functions (`flag`, `option`, `positionals`). | |||
| 50 | 50 | ||
| 51 | ```rust | 51 | ```rust |
| 52 | const params = comptime []clap.Param(void){ | 52 | const params = comptime []clap.Param(void){ |
| 53 | clap.Param(void).flag({}, false, clap.Names.prefix("help")), | 53 | clap.Param(void).flag({}, false, clap.Names.both("help")), |
| 54 | clap.Param(void).option({}, true, clap.Names.prefix("number")), | 54 | clap.Param(void).option({}, true, clap.Names.both("number")), |
| 55 | clap.Param(void).positional({}), | 55 | clap.Param(void).positional({}), |
| 56 | }; | 56 | }; |
| 57 | 57 | ||
| @@ -78,7 +78,7 @@ program can take: | |||
| 78 | 78 | ||
| 79 | ```rust | 79 | ```rust |
| 80 | const params = comptime []clap.Param(void){ | 80 | const params = comptime []clap.Param(void){ |
| 81 | clap.Param(void).init({}, false, clap.Names.prefix("help")), | 81 | clap.Param(void).init({}, false, clap.Names.both("help")), |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| 84 | var os_iter = clap.args.OsIterator.init(allocator); | 84 | var os_iter = clap.args.OsIterator.init(allocator); |
| @@ -123,11 +123,11 @@ try clap.help( | |||
| 123 | []clap.Param([]const u8){ | 123 | []clap.Param([]const u8){ |
| 124 | clap.Param([]const u8).flag( | 124 | clap.Param([]const u8).flag( |
| 125 | "Display this help and exit.", | 125 | "Display this help and exit.", |
| 126 | clap.Names.prefix("help"), | 126 | clap.Names.both("help"), |
| 127 | ), | 127 | ), |
| 128 | clap.Param([]const u8).flag( | 128 | clap.Param([]const u8).flag( |
| 129 | "Output version information and exit.", | 129 | "Output version information and exit.", |
| 130 | clap.Names.prefix("version"), | 130 | clap.Names.both("version"), |
| 131 | ), | 131 | ), |
| 132 | }, | 132 | }, |
| 133 | ); | 133 | ); |