Commit graph

3517 commits

Author SHA1 Message Date
Pavan Kumar Sunkara
821d79aac7
Merge pull request #1878 from lu-zero/update_from_arg_matches
Add update_from_arg_matches to FromArgMatches
2020-11-14 12:38:16 +01:00
Luca Barbato
d18ff58391 Add a skip test 2020-11-14 11:09:39 +01:00
Luca Barbato
3e51839383 Rename the update trait methods 2020-11-14 10:58:30 +01:00
Luca Barbato
ac3e5f9a8f Factor out argument parsing generation 2020-11-14 10:53:13 +01:00
Luca Barbato
7a5c12e79a Avoid a level of indirection for augment_*subcommand 2020-11-14 10:17:13 +01:00
Luca Barbato
77e4e65e31 Address new clippy lints 2020-11-14 10:17:13 +01:00
Luca Barbato
9ebb46d65c Test for partial updates 2020-11-14 10:17:13 +01:00
Luca Barbato
5d342a7438 Update to the new from_subcommand logic 2020-11-14 10:17:13 +01:00
Luca Barbato
a9276576d7 wip: Add a variant for augment* for updates 2020-11-14 10:17:13 +01:00
Luca Barbato
8b6255057d wip: Complete update_subcommand
external subcommand updating is equivalent to replace it
2020-11-14 10:17:13 +01:00
Luca Barbato
646b3fe811 wip: Add tests and user-facing functions 2020-11-14 10:17:13 +01:00
Luca Barbato
d1fc83a8fa wip: Add update_from_arg_matches to FromArgMatches 2020-11-14 10:17:13 +01:00
Pavan Kumar Sunkara
8d037452c7 Added clap.rs site 2020-11-14 00:39:23 +01:00
bors[bot]
602c79fecd
Merge #2208
2208: Updated changelog and more dep upgrade logic r=pksunkara a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-11-13 02:31:27 +00:00
Pavan Kumar Sunkara
93bad33e48 Updated changelog and more dep upgrade logic 2020-11-13 03:08:09 +01:00
bors[bot]
022f18278e
Merge #2205
2205: Fix wrong StrictUTF8 handling when AllowExternalSubcommands r=pksunkara a=ldm0



Co-authored-by: ldm0 <ldm2993593805@163.com>
2020-11-08 19:33:23 +00:00
ldm0
ff3b23824d Fix wrong StrictUTF8 handling when AllowExternalSubcommands 2020-11-08 19:06:32 +00:00
ldm0
347cd228a0 Add tests
Fix tests
2020-11-08 19:06:32 +00:00
bors[bot]
3f2eeb5417
Merge #2204
2204: Parser refactor r=pksunkara a=ldm0



Co-authored-by: Donough Liu <ldm2993593805@163.com>
2020-11-08 15:32:29 +00:00
Donough Liu
93b9bd9162 Apply suggestions 2020-11-08 23:06:24 +08:00
Donough Liu
407cdac8e0 Refactor: remove a persistent parser state ValidNegNumFound 2020-11-08 16:05:07 +08:00
Donough Liu
3c2f60c9f3 Remove unreachable branch in use_long_arg() 2020-11-08 16:05:07 +08:00
Donough Liu
7aa2358d6e Simplify is_new_arg() 2020-11-08 16:05:07 +08:00
Donough Liu
b1c7785810 Remove replace variable
Resolve TODO

Small refactors

More descriptive replaced item recovering
2020-11-08 16:05:03 +08:00
bors[bot]
2b68b0f0c7
Merge #2203
2203: Fix suggestions of a subcommand shadowing valid input r=pksunkara a=ldm0



Co-authored-by: Donough Liu <ldm2993593805@163.com>
2020-11-07 13:01:56 +00:00
Donough Liu
5e4b4f4196 Remove invalid suggestion on using subcommand after positional argument 2020-11-07 20:32:28 +08:00
Donough Liu
2b1f47f975 Reduce osstring construction 2020-11-07 16:43:14 +08:00
Donough Liu
020b07b77b Typo fix 2020-11-07 16:43:14 +08:00
Donough Liu
582db739c8 Shrink 2020-11-07 16:43:14 +08:00
bors[bot]
be6e1f7647
Merge #2190
2190: Make `Arg::env()` and `Arg::env_os()` `takes_value(false)` by default r=pksunkara a=ldm0



Co-authored-by: Donough Liu <ldm2993593805@163.com>
2020-11-06 21:37:31 +00:00
bors[bot]
93c34cbc20
Merge #2200
2200: Mention colored help is not available by default r=pksunkara a=pickfire



Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-11-06 21:14:52 +00:00
Donough Liu
f17b29acbb Make Arg::env() and Arg::env_os() takes_value(false) by default 2020-11-06 21:51:39 +01:00
Ivan Tham
d985755ca1 Mention colored help is not available by default
While reading the features available, it would be good to be informed that
colored help is available, this makes colored help more discoverable.
2020-11-06 21:51:18 +01:00
bors[bot]
d51c0b5a55
Merge #2202
2202: Move more to github ci r=pksunkara a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-11-06 20:25:00 +00:00
Pavan Kumar Sunkara
469aacda7e Move more to github ci 2020-11-06 21:02:06 +01:00
bors[bot]
97b4fb639f
Merge #2165
2165: Help & Version settings r=pksunkara a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-10-28 06:27:49 +00:00
Pavan Kumar Sunkara
5dd9584119 Improve the logic for help & version building & parsing 2020-10-26 12:13:03 +01:00
bors[bot]
829d953b48
Merge #2174
2174: Consistently wrap help and subcommand messages(with refactoring) r=pksunkara a=ldm0



Co-authored-by: Donough Liu <ldm2993593805@163.com>
2020-10-25 22:07:50 +00:00
Donough Liu
a19bfa1c35 Consistently wrap help and subcommand messages(with refactoring) 2020-10-25 22:43:01 +01:00
bors[bot]
04fd3369d3
Merge #2183
2183: Add `conflicts_with_all` note to docs r=pksunkara a=cbr9



Co-authored-by: KBR9 <cabero96@protonmail.com>
2020-10-24 21:39:00 +00:00
KBR9
625c201f65 Add docs about conflicts_with_all usage in yaml
add note about conflicts_with yaml option

add note about conflicts_with yaml option

fix wrapping

remove unnecessary sentence

remove note from conflicts_with
2020-10-24 21:54:01 +02:00
Pavan Kumar Sunkara
e8a06e79cd Rename setting VersionlessSubcommands => DisableVersionForSubcommands 2020-10-24 16:04:49 +02:00
Pavan Kumar Sunkara
d6e2246aab Rename setting DisableVersion => DisableVersionFlag 2020-10-24 16:03:12 +02:00
Pavan Kumar Sunkara
45f0ee8b55 Rename setting DisableHelpFlags => DisableHelpFlag 2020-10-24 16:03:12 +02:00
Pavan Kumar Sunkara
9c672510f3 Update changelog 2020-10-24 16:03:12 +02:00
bors[bot]
2f5b1e66b2
Merge #2182
2182:  Add assertions for required and default simultaneously r=pksunkara a=CastilloDel



Co-authored-by: CastilloDel <delcastillodelarosadaniel@gmail.com>
2020-10-24 11:53:47 +00:00
CastilloDel
88ac1f1803 Add assertions for required and default simultaneously
Add the suggested changes

Fix test issue_1050_num_vals_and_defaults

It used a required which isn't needed for the purpose of the test.

Add tests for the default+required assertions

Add test for positional args with long or short
2020-10-24 12:10:07 +01:00
bors[bot]
fad3d9632e
Merge #2162
2162: Move lint ci to github r=pksunkara a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-10-21 07:18:32 +00:00
bors[bot]
d6180db777
Merge #2179
2179: clap_generate skips flags/opts with heading r=pksunkara a=CertainLach



Co-authored-by: Yaroslav Bolyukin <iam@lach.pw>
2020-10-19 17:21:13 +00:00
Yaroslav Bolyukin
ea304e4607
clap_generate skips flags/opts with heading
Follow-up issue #2022

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
2020-10-19 20:55:07 +05:00