summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/README.md b/README.md
index 2bc86a6..92de659 100644
--- a/README.md
+++ b/README.md
@@ -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
22const params = []clap.Param(u8){ 22const 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
52const params = comptime []clap.Param(void){ 52const 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
80const params = comptime []clap.Param(void){ 80const 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
84var os_iter = clap.args.OsIterator.init(allocator); 84var 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);