From 928510dc510aac49f7dbc1f1c8e9f4683ab35d84 Mon Sep 17 00:00:00 2001 From: Jimmi HC Date: Thu, 15 Nov 2018 18:44:07 +0100 Subject: Changed Names.prefix to Names.both --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'README.md') 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 ```rust const params = []clap.Param(u8){ - clap.Param(void).flag('h', false, clap.Names.prefix("help")), - clap.Param(void).option('n', true, clap.Names.prefix("number")), + clap.Param(void).flag('h', false, clap.Names.both("help")), + clap.Param(void).option('n', true, clap.Names.both("number")), clap.Param(void).positional('f'), }; @@ -50,8 +50,8 @@ them available through three functions (`flag`, `option`, `positionals`). ```rust const params = comptime []clap.Param(void){ - clap.Param(void).flag({}, false, clap.Names.prefix("help")), - clap.Param(void).option({}, true, clap.Names.prefix("number")), + clap.Param(void).flag({}, false, clap.Names.both("help")), + clap.Param(void).option({}, true, clap.Names.both("number")), clap.Param(void).positional({}), }; @@ -78,7 +78,7 @@ program can take: ```rust const params = comptime []clap.Param(void){ - clap.Param(void).init({}, false, clap.Names.prefix("help")), + clap.Param(void).init({}, false, clap.Names.both("help")), }; var os_iter = clap.args.OsIterator.init(allocator); @@ -123,11 +123,11 @@ try clap.help( []clap.Param([]const u8){ clap.Param([]const u8).flag( "Display this help and exit.", - clap.Names.prefix("help"), + clap.Names.both("help"), ), clap.Param([]const u8).flag( "Output version information and exit.", - clap.Names.prefix("version"), + clap.Names.both("version"), ), }, ); -- cgit v1.2.3 From f4eb2e0937614b0c1c4dd99387146c3bd0d4649e Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Fri, 16 Nov 2018 09:56:29 +0100 Subject: Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 92de659..c46ef11 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ The `StreamingClap` is base of all the other parsers. It's a streaming parser th ```rust const params = []clap.Param(u8){ - clap.Param(void).flag('h', false, clap.Names.both("help")), - clap.Param(void).option('n', true, clap.Names.both("number")), - clap.Param(void).positional('f'), + clap.Param(u8).flag('h', false, clap.Names.both("help")), + clap.Param(u8).option('n', true, clap.Names.both("number")), + clap.Param(u8).positional('f'), }; var os_iter = clap.args.OsIterator.init(allocator); -- cgit v1.2.3 From d0005fab619a0f8cc92b166f2d40764ab0d3043e Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Tue, 4 Dec 2018 14:48:46 +0100 Subject: Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index c46ef11..0d88e53 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 ```rust const params = []clap.Param(u8){ - clap.Param(u8).flag('h', false, clap.Names.both("help")), - clap.Param(u8).option('n', true, clap.Names.both("number")), + clap.Param(u8).flag('h', clap.Names.both("help")), + clap.Param(u8).option('n', clap.Names.both("number")), clap.Param(u8).positional('f'), }; @@ -50,8 +50,8 @@ them available through three functions (`flag`, `option`, `positionals`). ```rust const params = comptime []clap.Param(void){ - clap.Param(void).flag({}, false, clap.Names.both("help")), - clap.Param(void).option({}, true, clap.Names.both("number")), + clap.Param(void).flag({}, clap.Names.both("help")), + clap.Param(void).option({}, clap.Names.both("number")), clap.Param(void).positional({}), }; @@ -78,7 +78,7 @@ program can take: ```rust const params = comptime []clap.Param(void){ - clap.Param(void).init({}, false, clap.Names.both("help")), + clap.Param(void).flag({}, clap.Names.both("help")), }; var os_iter = clap.args.OsIterator.init(allocator); -- cgit v1.2.3 From 7800f4e2247cbf3eaf5306a7e41ff17130885328 Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Sun, 16 Dec 2018 13:23:40 +0100 Subject: Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 0d88e53..b64ab2b 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ A simple and easy to use command line argument parser library for Zig. ### `StreamingClap` -The `StreamingClap` is base of all the other parsers. It's a streaming parser that uses an +The `StreamingClap` is the base of all the other parsers. It's a streaming parser that uses an `args.Iterator` to provide it with arguments lazily. ```rust @@ -106,7 +106,7 @@ zig-clap/example/comptime-clap.zig:41:18: note: called from here ^ ``` -Ofc, this limits you to use only parameters that are comptime known. +Ofc, this limits you to parameters that are comptime known. ### `help` -- cgit v1.2.3