hk
895c903b61
refactor: adding get_global, making two functions private
...
preserving the observable behavior of the existing
public api, while handling global arguments separately in
get_arg_conflicts_with
2020-11-09 15:29:00 +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
hk
5650e37969
fix: compatability with rustc 1.42.0
...
fixup!
2020-11-05 13:08:04 +01:00
hk
3923ebd86d
tests(clap_generate): zsh completion generation bug
...
the test that was added tests for a panic that would occur
when a global argument had a conflict with another argument
that wasn't present in all the subcommands that the global
argument was present in
this would occur inside the get_arg_conflicts_with function
2020-10-30 21:23:35 +01:00
hk
1b451f62ad
fix(clap_generate): zsh completion generation panic
...
zsh completion generation would panic if a global argument
had conflicts with another argument which was present in its
own command but not in its subcommands
2020-10-30 21:04:17 +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
bors[bot]
1d0b21908f
Merge #2178
...
2178: Various documentation fixes r=pksunkara a=cstyles
Co-authored-by: Collin Styles <collingstyles@gmail.com>
2020-10-18 22:08:05 +00:00
bors[bot]
01027e465c
Merge #2177
...
2177: Add an assertion for positional args defining long or short r=pksunkara a=CastilloDel
Co-authored-by: CastilloDel <delcastillodelarosadaniel@gmail.com>
2020-10-18 21:40:19 +00:00
Collin Styles
0d4e2e5f9d
docs: remove links in documentation for requires_all
...
These links were broken but rather than fix them, let's just remove them
since they're inside the documentation for the function that they link
to which seems unnecessary.
2020-10-18 12:05:33 -07:00
Collin Styles
5b74d84f3c
docs: remove links in documentation for requires_if
functions
...
These links were broken but rather than fix them, let's just remove them
since they're inside the documentation for the functions that they link
to which seems unnecessary.
2020-10-18 12:05:32 -07:00
Collin Styles
3d5e1d987a
docs: add a bunch of missing links to the docs for Arg::env
2020-10-18 12:05:31 -07:00
Collin Styles
ba89a253fc
docs: remove link to allow_hyphen_values
...
This link was broken but rather than fix it, let's just remove it since
it's inside the documentation for the function that it links to which
seems unnecessary.
2020-10-18 12:05:30 -07:00
Collin Styles
8522b9c1cf
docs: fix another typo and add a missing link for Last
2020-10-18 12:05:29 -07:00
Collin Styles
eadecc5c1d
docs: add missing link in ArgGroup
documentation
2020-10-18 12:05:28 -07:00
Collin Styles
096338d163
docs: correct typo in ErrorKind
documentation
2020-10-18 12:05:27 -07:00
Collin Styles
75c1fdb707
docs: fix various copy-paste errors related to default_value
functions
2020-10-18 12:05:26 -07:00
Collin Styles
f7837b2ac0
docs: change single quotes to backticks
...
Pretty sure these are just typos.
2020-10-18 12:05:25 -07:00