Commit graph

3578 commits

Author SHA1 Message Date
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
Collin Styles
9f3cbcd149 docs: wrap Arg in backticks instead of quotes
This looks better and is more consistent with the rest of the
documentation.
2020-10-18 12:05:22 -07:00
Collin Styles
b3caf81918 docs: fix a bunch of broken documentation links 2020-10-18 12:05:19 -07:00
CastilloDel
acd3293af2 Add an assertion for positional args defining long or short
Also update the docs to reflect that Arg.index shouldn't be
used with long or short
2020-10-18 19:51:13 +01:00
bors[bot]
1519ec81f7
Merge #2175
2175: Add option to hide env keys from help text r=pksunkara a=jacobmischka



Co-authored-by: Jacob Mischka <jacob@mischka.me>
2020-10-18 00:04:32 +00:00
Jacob Mischka
b3e638ad44
Add option to hide autogenerated env section from help text 2020-10-17 16:48:35 -05:00
bors[bot]
d2dd54b555
Merge #2172
2172: Don't use default value when option is passed r=pksunkara a=davidhewitt



Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2020-10-14 20:54:10 +00:00
David Hewitt
94f6889116 Don't use default value when option is passed 2020-10-14 20:00:40 +01:00
bors[bot]
b5504e22da
Merge #2169
2169: Attach validation error as Error::source r=pksunkara a=Nemo157



Co-authored-by: Wim Looman <git@nemo157.com>
2020-10-14 05:42:55 +00:00
Wim Looman
b31df047b8 Attach validation error as Error::source 2020-10-13 22:13:04 +02:00
bors[bot]
5a1a209965
Merge #2161
2161: Fix parser skipping options without heading set r=pksunkara a=CertainLach



Co-authored-by: Yaroslav Bolyukin <iam@lach.pw>
2020-10-11 08:55:33 +00:00
bors[bot]
0825b09335
Merge #2168
2168: Change MissingArgumentOrSubcommand to DisplayHelpOnMissingArgumentOrS… r=pksunkara a=ldm0



Co-authored-by: Donough Liu <ldm2993593805@163.com>
2020-10-11 08:22:24 +00:00
Donough Liu
7f627fceee Change MissingArgumentOrSubcommand to DisplayHelpOnMissingArgumentOrSubcommand and don't use stderr 2020-10-11 15:42:47 +08:00
bors[bot]
4f90f3e4bb
Merge #2166
2166: Sort options base on option's short and long representation r=ldm0 a=ldm0



Co-authored-by: Donough Liu <ldm2993593805@163.com>
2020-10-10 18:54:49 +00:00
Donough Liu
15c77150a9 Sort options base on option's short and long representation 2020-10-11 02:08:10 +08:00
bors[bot]
9d2ef79512
Merge #2163
2163: Fix typos and grammar r=pksunkara a=intgr



Co-authored-by: Marti Raudsepp <marti@juffo.org>
2020-10-10 14:52:36 +00:00
Marti Raudsepp
cda89a2af1 Fix typos and grammar
Some more fixes in addition to 594c535ba2
* Some I noticed manually.
* Some were found by Topy (https://github.com/intgr/topy), either new
  rules from Typo or new code in clap.
* `etc.` and `e.g.` rules were disabled during the last run.
2020-10-10 16:22:05 +03:00
bors[bot]
34551bb23d
Merge #2158
2158: Add examples for using value_hint with clap_derive r=pksunkara a=intgr



Co-authored-by: Marti Raudsepp <marti@juffo.org>
2020-10-09 22:55:35 +00:00
Marti Raudsepp
bc7cc4fbab Add examples for using value_hint with clap_derive
Also tweaked clap_generate example a little.
2020-10-10 00:11:44 +03:00
Pavan Kumar Sunkara
b27cd6e171 Move lint ci to github 2020-10-09 23:06:18 +02:00
bors[bot]
edb1c2e8b2
Merge #2160
2160: Fix: Don't mention unused subcommands(Partly cherry pick ef92e2b) r=pksunkara a=ldm0



Co-authored-by: Donough Liu <ldm2993593805@163.com>
2020-10-09 20:07:56 +00:00
Donough Liu
c9a407aa54 Fix: Don't mention unused subcommands (Partly cherry pick ef92e2b)
Add `\t` for consistency
2020-10-10 03:34:28 +08:00
bors[bot]
4ff4879400
Merge #2154
2154: Fix the error logic and error message for suggesting `--` before a flag r=pksunkara a=ldm0



Co-authored-by: Donough Liu <ldm2993593805@163.com>
2020-10-09 19:05:13 +00:00
Yaroslav Bolyukin
6050a17024
fix: #2022
Parser was skipping default values for options with headings

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
2020-10-09 23:45:11 +05:00
Yaroslav Bolyukin
659d688543
test: add failing test for #2022
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
2020-10-09 23:45:07 +05:00
bors[bot]
7df091775c
Merge #2157
2157: Suggest using subcommand when supplied after `--` r=pksunkara a=ldm0



Co-authored-by: Donough Liu <ldm2993593805@163.com>
2020-10-09 16:44:53 +00:00
Donough Liu
9766aa11b1 Remove redundant(wrong) error processing
Argument prefixed by `-` will never inferred as a subcommand

Suggest using subcommand when supplied after `--`

Cargo fmt, adding test for wrongly using subcommand after `--`

Fix test

Fix clippy
2020-10-10 00:06:50 +08:00
Donough Liu
5815246fd9 Fix the error logic and error message for suggesting -- before a flag
Fix tests

Add test for issue #1284

Apply nitpicks
2020-10-10 00:04:22 +08:00
bors[bot]
6ce1e4fda2
Merge #2159
2159: More changelog and some consistency r=pksunkara a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-10-09 15:28:44 +00:00