summaryrefslogtreecommitdiffstats
path: root/vendor/clap
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/clap')
-rw-r--r--vendor/clap/.cargo-checksum.json2
-rw-r--r--vendor/clap/Cargo.lock159
-rw-r--r--vendor/clap/Cargo.toml36
-rw-r--r--vendor/clap/LICENSE-MIT2
-rw-r--r--vendor/clap/README.md146
-rw-r--r--vendor/clap/examples/README.md40
-rw-r--r--vendor/clap/examples/cargo-example-derive.md2
-rw-r--r--vendor/clap/examples/cargo-example-derive.rs4
-rw-r--r--vendor/clap/examples/cargo-example.md2
-rw-r--r--vendor/clap/examples/cargo-example.rs2
-rw-r--r--vendor/clap/examples/demo.md9
-rw-r--r--vendor/clap/examples/demo.rs2
-rw-r--r--vendor/clap/examples/derive_ref/README.md440
-rw-r--r--vendor/clap/examples/derive_ref/augment_args.rs11
-rw-r--r--vendor/clap/examples/derive_ref/flatten_hand_args.rs8
-rw-r--r--vendor/clap/examples/escaped-positional-derive.md4
-rw-r--r--vendor/clap/examples/escaped-positional-derive.rs4
-rw-r--r--vendor/clap/examples/escaped-positional.md4
-rw-r--r--vendor/clap/examples/escaped-positional.rs9
-rw-r--r--vendor/clap/examples/git-derive.md4
-rw-r--r--vendor/clap/examples/git-derive.rs4
-rw-r--r--vendor/clap/examples/git.md2
-rw-r--r--vendor/clap/examples/git.rs2
-rw-r--r--vendor/clap/examples/multicall-busybox.md6
-rw-r--r--vendor/clap/examples/multicall-hostname.md6
-rw-r--r--vendor/clap/examples/pacman.md2
-rw-r--r--vendor/clap/examples/pacman.rs5
-rw-r--r--vendor/clap/examples/tutorial_builder/01_quick.md37
-rw-r--r--vendor/clap/examples/tutorial_builder/01_quick.rs4
-rw-r--r--vendor/clap/examples/tutorial_builder/02_app_settings.md19
-rw-r--r--vendor/clap/examples/tutorial_builder/02_app_settings.rs4
-rw-r--r--vendor/clap/examples/tutorial_builder/02_apps.md19
-rw-r--r--vendor/clap/examples/tutorial_builder/02_crate.md18
-rw-r--r--vendor/clap/examples/tutorial_builder/02_crate.rs3
-rw-r--r--vendor/clap/examples/tutorial_builder/03_01_flag_bool.md23
-rw-r--r--vendor/clap/examples/tutorial_builder/03_01_flag_bool.rs11
-rw-r--r--vendor/clap/examples/tutorial_builder/03_01_flag_count.md23
-rw-r--r--vendor/clap/examples/tutorial_builder/03_01_flag_count.rs11
-rw-r--r--vendor/clap/examples/tutorial_builder/03_02_option.md32
-rw-r--r--vendor/clap/examples/tutorial_builder/03_02_option.rs4
-rw-r--r--vendor/clap/examples/tutorial_builder/03_03_positional.md22
-rw-r--r--vendor/clap/examples/tutorial_builder/03_03_positional.rs6
-rw-r--r--vendor/clap/examples/tutorial_builder/03_04_subcommands.md64
-rw-r--r--vendor/clap/examples/tutorial_builder/03_04_subcommands.rs4
-rw-r--r--vendor/clap/examples/tutorial_builder/03_05_default_values.md22
-rw-r--r--vendor/clap/examples/tutorial_builder/03_05_default_values.rs4
-rw-r--r--vendor/clap/examples/tutorial_builder/04_01_enum.md29
-rw-r--r--vendor/clap/examples/tutorial_builder/04_01_enum.rs44
-rw-r--r--vendor/clap/examples/tutorial_builder/04_01_possible.md29
-rw-r--r--vendor/clap/examples/tutorial_builder/04_01_possible.rs4
-rw-r--r--vendor/clap/examples/tutorial_builder/04_02_parse.md31
-rw-r--r--vendor/clap/examples/tutorial_builder/04_02_parse.rs4
-rw-r--r--vendor/clap/examples/tutorial_builder/04_02_validate.md31
-rw-r--r--vendor/clap/examples/tutorial_builder/04_02_validate.rs4
-rw-r--r--vendor/clap/examples/tutorial_builder/04_03_relations.md58
-rw-r--r--vendor/clap/examples/tutorial_builder/04_03_relations.rs10
-rw-r--r--vendor/clap/examples/tutorial_builder/04_04_custom.md57
-rw-r--r--vendor/clap/examples/tutorial_builder/04_04_custom.rs15
-rw-r--r--vendor/clap/examples/tutorial_builder/05_01_assert.rs15
-rw-r--r--vendor/clap/examples/tutorial_builder/README.md658
-rw-r--r--vendor/clap/examples/tutorial_derive/01_quick.md37
-rw-r--r--vendor/clap/examples/tutorial_derive/02_app_settings.md19
-rw-r--r--vendor/clap/examples/tutorial_derive/02_apps.md19
-rw-r--r--vendor/clap/examples/tutorial_derive/02_crate.md18
-rw-r--r--vendor/clap/examples/tutorial_derive/02_crate.rs2
-rw-r--r--vendor/clap/examples/tutorial_derive/03_01_flag_bool.md23
-rw-r--r--vendor/clap/examples/tutorial_derive/03_01_flag_count.md23
-rw-r--r--vendor/clap/examples/tutorial_derive/03_02_option.md32
-rw-r--r--vendor/clap/examples/tutorial_derive/03_03_positional.md22
-rw-r--r--vendor/clap/examples/tutorial_derive/03_04_subcommands.md64
-rw-r--r--vendor/clap/examples/tutorial_derive/03_05_default_values.md22
-rw-r--r--vendor/clap/examples/tutorial_derive/04_01_enum.md29
-rw-r--r--vendor/clap/examples/tutorial_derive/04_01_enum.rs4
-rw-r--r--vendor/clap/examples/tutorial_derive/04_02_parse.md31
-rw-r--r--vendor/clap/examples/tutorial_derive/04_02_validate.md31
-rw-r--r--vendor/clap/examples/tutorial_derive/04_03_relations.md58
-rw-r--r--vendor/clap/examples/tutorial_derive/04_03_relations.rs2
-rw-r--r--vendor/clap/examples/tutorial_derive/04_04_custom.md57
-rw-r--r--vendor/clap/examples/tutorial_derive/05_01_assert.rs2
-rw-r--r--vendor/clap/examples/tutorial_derive/README.md639
-rw-r--r--vendor/clap/examples/typed-derive.md4
-rw-r--r--vendor/clap/examples/typed-derive.rs4
-rw-r--r--vendor/clap/src/_cookbook/cargo_example.rs7
-rw-r--r--vendor/clap/src/_cookbook/cargo_example_derive0
-rw-r--r--vendor/clap/src/_cookbook/cargo_example_derive.rs7
-rw-r--r--vendor/clap/src/_cookbook/escaped_positional.rs7
-rw-r--r--vendor/clap/src/_cookbook/escaped_positional_derive.rs7
-rw-r--r--vendor/clap/src/_cookbook/git.rs7
-rw-r--r--vendor/clap/src/_cookbook/git_derive.rs7
-rw-r--r--vendor/clap/src/_cookbook/mod.rs55
-rw-r--r--vendor/clap/src/_cookbook/multicall_busybox.rs7
-rw-r--r--vendor/clap/src/_cookbook/multicall_hostname.rs7
-rw-r--r--vendor/clap/src/_cookbook/pacman.rs7
-rw-r--r--vendor/clap/src/_cookbook/repl.rs5
-rw-r--r--vendor/clap/src/_cookbook/typed_derive.rs7
-rw-r--r--vendor/clap/src/_derive/_tutorial.rs205
-rw-r--r--vendor/clap/src/_derive/mod.rs510
-rw-r--r--vendor/clap/src/_faq.rs95
-rw-r--r--vendor/clap/src/_features.rs27
-rw-r--r--vendor/clap/src/_tutorial.rs204
-rw-r--r--vendor/clap/src/builder/action.rs8
-rw-r--r--vendor/clap/src/builder/app_settings.rs32
-rw-r--r--vendor/clap/src/builder/arg.rs20
-rw-r--r--vendor/clap/src/builder/arg_settings.rs27
-rw-r--r--vendor/clap/src/builder/command.rs106
-rw-r--r--vendor/clap/src/builder/value_parser.rs2
-rw-r--r--vendor/clap/src/derive.rs28
-rw-r--r--vendor/clap/src/error/kind.rs2
-rw-r--r--vendor/clap/src/error/mod.rs11
-rw-r--r--vendor/clap/src/lib.rs91
-rw-r--r--vendor/clap/src/macros.rs24
-rw-r--r--vendor/clap/src/output/usage.rs117
-rw-r--r--vendor/clap/src/parser/arg_matcher.rs4
-rw-r--r--vendor/clap/src/parser/error.rs11
-rw-r--r--vendor/clap/src/parser/matches/arg_matches.rs74
-rw-r--r--vendor/clap/src/parser/parser.rs148
116 files changed, 2836 insertions, 2418 deletions
diff --git a/vendor/clap/.cargo-checksum.json b/vendor/clap/.cargo-checksum.json
index 729aee79b..22fa24875 100644
--- a/vendor/clap/.cargo-checksum.json
+++ b/vendor/clap/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.lock":"6d96d441076749454963df06d637e5680e5ecdcdd36026f160c2d181aaca3bdc","Cargo.toml":"cb59c1e945c5606119203d907c01a40606070414b8913440f32e250c5db8c211","LICENSE-APACHE":"c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4","LICENSE-MIT":"6725d1437fc6c77301f2ff0e7d52914cf4f9509213e1078dc77d9356dbe6eac5","README.md":"b5d5ba727e9f1a8797016bb041bc7888a209099d7dc42e445a89b1f8d3ac510d","examples/README.md":"9d19f6dfb53aadbe18aca773136d34bd28352b8efd69dfee217f26ee0eb9269a","examples/cargo-example-derive.md":"53a35e48cd04dfa10d70f99eb6d97d0d74110958f7f9e4ffc460fca87a256a73","examples/cargo-example-derive.rs":"627a74b7dc6d829b8facd314d0de46418b2420c6998e883f71a3cb7639d3a22d","examples/cargo-example.md":"1f270b0a0ac9122feb9cdac0887c1c1bcf1b654fed27147871c9cfe71851a4d9","examples/cargo-example.rs":"66293c7e200a87fceca691ab858293142c8a1536ef1d2c0dd14a6056289866a2","examples/demo.md":"3e986afca0863142fdd4cc092b5969fba32a70fac8adf84a55bd652f4b30eedb","examples/demo.rs":"5361cac70b662dd6d4d785738b99cfadf1f838c90507f19ea1aeef05aba0ee72","examples/derive_ref/README.md":"be2cfd81b9e2dc5e5910243f4b2f032e0b2c8af0592dcd050705e8718be8038d","examples/derive_ref/augment_args.rs":"69057536807ceb08e35802f8cf65c0f6ddd260a66a90000c8c6294031d466be3","examples/derive_ref/augment_subcommands.rs":"5535f8ca1893101acb5eba8edc311497431ff9aa26f62f1d9743bdc147bef7a4","examples/derive_ref/custom-bool.md":"d92e441199c7584d4b888c45124366cc4802ec8ea67cdcbb3423ffaa3c5268ac","examples/derive_ref/custom-bool.rs":"f88e9c68d2447a24bc98e05124fea17836155f32cff30a2b8a03ad254383247c","examples/derive_ref/flatten_hand_args.rs":"c09b751eb4e89e825af4de25a67d735c7b4794536bcff96b0ab8ee816c34413a","examples/derive_ref/hand_subcommand.rs":"1a5464b9c5791361930b5591adeb6fcf6f14b83abdfa6443d2c80bcf0c097b3e","examples/derive_ref/interop_tests.md":"3a357e82cfc155f71e0348be33f78295aa77839c3e3a5b7c1783cbd1259e6a61","examples/escaped-positional-derive.md":"b2190ada5ad2634c3ceb7f9d98293512628762545f9519579cbee9867c6a406a","examples/escaped-positional-derive.rs":"ac3127e8cc7a8953886778824a4d6e12470488546f10eeac6f9817ecaef1532e","examples/escaped-positional.md":"b6a5c103f5cea1464b5ac8e63e1964f032a4dbb4a908e45b9b391f4857fe2684","examples/escaped-positional.rs":"aaf106cdbe8f1eb5d9f3032df485d5661885f95402f026a34c42431f98a08323","examples/git-derive.md":"1a20f30d1c6df28d7e48b527b0726e9440f54d55a1e0b9e059b2322a7960ee72","examples/git-derive.rs":"225a33b0cd84840de2ba623b6b506b2fa4b02a9f5fbf62cdc2b2626e661501bd","examples/git.md":"acb3a44f954a6e2160f8989952981fb4baea8b97b921e4227c67896bc64d5e4a","examples/git.rs":"293b1289550ea38eabf1af7c6a855065170ff785e97be113928f045c50c1a3e9","examples/multicall-busybox.md":"3cb9d00ad110fc99c298dac4aa471e2f7a304aecef51d2eda67f5fbf36c41293","examples/multicall-busybox.rs":"709f71a82295a539d0a239371d35d1eeb517eaa3bb0a4db406bb7e5d3541a4a5","examples/multicall-hostname.md":"8c2d95fa8b940d4f788f96cf6b08b81bb2541bf12adff63bdff90dfc24567c7e","examples/multicall-hostname.rs":"cc58a924dd2e57281f36e30481a1cbc8186952adbf149f9e1e13f9c673614fd9","examples/pacman.md":"e583ef465e55fa2fffef3b121e4a90835b8905ef3ffe2ec9ae91702832b7392d","examples/pacman.rs":"4aea4eed4408458d57d3ff91f0e7f8833eeee30dd71043f5a6d06968c6c9712e","examples/repl.rs":"d50c1da634c237b26989994b1efa6fd1a087874a82d1fc8c1863be4ea8deaa8c","examples/tutorial_builder/01_quick.rs":"2734001dc1f67842f8ff3486397738f10dcbdf4bdd15326c13aebd5fafe0dabd","examples/tutorial_builder/02_app_settings.rs":"ca7e0b49019a444053ed13a7df8108d460430819b4fb04c4c6097225dc630293","examples/tutorial_builder/02_apps.rs":"a7016469d10259ae0025fb6ad5b9d3c732cf082869348005d4774d2bb0722d2d","examples/tutorial_builder/02_crate.rs":"5d7397901ebf82e3975626b3737fca3a95868cde42ce74d41bb3c96429878906","examples/tutorial_builder/03_01_flag_bool.rs":"1e904b39c7aaafc407a841ab8b549152263073a1af11773d13dc04d43fd541ef","examples/tutorial_builder/03_01_flag_count.rs":"02778a53afd6170c7ef7d358909237d4fe548adc5d7e650916d26f765040c25b","examples/tutorial_builder/03_02_option.rs":"7bca1c12b4904f89516ebdb88019c959c5adcf2a84244047f988b71f82760bd4","examples/tutorial_builder/03_03_positional.rs":"290921224b17df7f77326df06421b2100462da143e7b5dbe014f7e8b6d727d2b","examples/tutorial_builder/03_04_subcommands.rs":"1d5769847403661b1bb82d7a39713c52e1decbe4027dfc3866d63f5cf6ae8a55","examples/tutorial_builder/03_05_default_values.rs":"5a4768214c57996b27989cd5af57c7b79cbccfab2f285a88a415c2b67b589e4b","examples/tutorial_builder/04_01_enum.rs":"813ce1cf91e2cacd7eb5bd7018b1125d41cd9b29970dfa3638a7cf73c06659a0","examples/tutorial_builder/04_01_possible.rs":"2ccba0ab59f6339bcd761160d17a1c7ec935716fbe137408338694c7d3ee56f0","examples/tutorial_builder/04_02_parse.rs":"9d022cb3a3af3e00fd6c7d647ee0915a275ce79e379676e98bebcd3484be344b","examples/tutorial_builder/04_02_validate.rs":"4450e7e1af3581be631ffe9afa363c88b44ee20a90ecbb4608246972d3f7fd93","examples/tutorial_builder/04_03_relations.rs":"90db469ca8a3f1c5eb90548e8c1c0afe796d163891bdac90f2d307949a400047","examples/tutorial_builder/04_04_custom.rs":"461a06cae62f5972937f71b42d04df44240dabd62e23058322f04026beceaec5","examples/tutorial_builder/05_01_assert.rs":"73c57b051550366ed412c8986f40549fd43dacf3894df7751313c5de16f46af1","examples/tutorial_builder/README.md":"027d95d9f951d4ffed9ec54a3950919ea4a3d9fd471bbda721151ed6ff6c5731","examples/tutorial_derive/01_quick.rs":"e17262c915199c4507d8950d5eafb73f3047e09b6dee2abbfe9f82ebf1b7ddd5","examples/tutorial_derive/02_app_settings.rs":"7e81f4c1640b0bfbd87aedd3eda79ae7c47c669dee79b643b35e54c1dc076ee8","examples/tutorial_derive/02_apps.rs":"e8cd02b5983b2203f1585b96858fade4cedfb124e366171d6b21fcb3f05b514e","examples/tutorial_derive/02_crate.rs":"c156589c36a8b21654b1a41f5f10240411053d3273e7af3797e91ca53fa61d28","examples/tutorial_derive/03_01_flag_bool.rs":"07c31218d0332d7437d80e19c7e3c7be711bf0f56bee3ffb1c4d6f7f253b9304","examples/tutorial_derive/03_01_flag_count.rs":"945be42994845145b9c579b3834f8c6375f239293ded84fba35754bbe9fdcf9b","examples/tutorial_derive/03_02_option.rs":"48be4cf49b498173200ad86d5d3cd64ce9381f86fdaaab70f05fc471f64a2185","examples/tutorial_derive/03_03_positional.rs":"f368ab1465ee4d84b84d175b97af6f64ce0676bec2482adef3ce966d2d8de26a","examples/tutorial_derive/03_04_subcommands.rs":"b25c8aec8f3816923b1154be91caafe0c2d2841fc1af5f0ef048f03d1273879e","examples/tutorial_derive/03_04_subcommands_alt.rs":"7ba6e81c2af6085b7e2721254500b34ee3e8622e20790b3c6f2786e165151b70","examples/tutorial_derive/03_05_default_values.rs":"0ba14153a3c72a2435ac3688b990171a1670eb3f2f7cef21886732e489fad435","examples/tutorial_derive/04_01_enum.rs":"a665af77196af86ba87f1725703011392fc27f24e3d442bbb5dfc4c0d4892c15","examples/tutorial_derive/04_02_parse.rs":"fbb23ef2d98d3cb401cec9dd29d5818e4c189cc9f54fe961a2fbd08632a9634c","examples/tutorial_derive/04_02_validate.rs":"87d9c465f912b69e5839ea87404a221a39421404012c1a7fd6e327b03ceb12f0","examples/tutorial_derive/04_03_relations.rs":"bfc12e66ad9c17182bed2ef86cd668242e6e87ab4ee20fa9bf3d2aa99385d61a","examples/tutorial_derive/04_04_custom.rs":"0e745c6dab0881c62190e82e01409b70cf3286dd0983db4a612f1be88fdd1a8d","examples/tutorial_derive/05_01_assert.rs":"4742d883a3446f32068d96c142ed18df40a50ad6ed4989e39980011f3d1adbdf","examples/tutorial_derive/README.md":"7902da25a153aa0032184e4ca54185d1a5d4c6aa53686b10a210b4decc276791","examples/typed-derive.md":"cf3ee8313709937cc9c5462e3826cca8679946a658d684e8a36e66b0950100a7","examples/typed-derive.rs":"67034bd557c0efb2a0b61ced263cab3ddddb4e4a2bff2f2901d4832f6961e17d","src/bin/stdio-fixture.rs":"e8f10afbfe1857bcf986d2f55be0ca19a50c905d9f650c6e1fd42dbacf219b04","src/builder/action.rs":"64633d218202f799a08fb43ce7f1fae6105ae5ed43386caf4aca2d8ac5352fc1","src/builder/app_settings.rs":"5a27df52d765b50f83ad1173525b66f92b156415aee62b238306b3b57c086e50","src/builder/arg.rs":"808037bb9e7084c27f9f136059653ab049630d07d9851e5e700c8a775655bd05","src/builder/arg_group.rs":"263d9c79e03015fe4e2fab4616fc73089be60fb2ec17aa2a06f3d6a24740432c","src/builder/arg_predicate.rs":"8c9fd14780cd42465f32f2e8927b97c06e686d09b5927ba3cd5bbd792af7a13d","src/builder/arg_settings.rs":"af739627b9b1451c633eb66b09536008d8b095cba518a4f28b82ea480e9400d6","src/builder/command.rs":"72d0031bce35aa6d6ebd6a2006fe26a9b222852fe5a58a23854d9ab7f27150c5","src/builder/debug_asserts.rs":"d1d5adc82cb8269445b2ef197f1e566f61e7f13d6a24afaad928e45e95aed170","src/builder/macros.rs":"904e42e72c49107ae324f45d5df24fbff13b9c7d4589f1a4ae38594add704434","src/builder/mod.rs":"205367cb5ba5d5ba7894091535ce3a5dd23b35fd436e003196d89523e7705566","src/builder/possible_value.rs":"62268b9da9eec8f4d1904ebfbd3a288fb78cfa71c357efadced28f0378bcfb93","src/builder/regex.rs":"b18891310186ecdcca9bb611833b7188cc80fe72e9fef27b63fa076b880a1acb","src/builder/tests.rs":"995c7d6be608b94c6f392f1356eba0cb8adb9ca661ffeebf7ebe6e8ad01a868c","src/builder/usage_parser.rs":"91d1af89196116aac2c0fb021f42f43f954aa3252df264e19a02a0cf5911d16b","src/builder/value_hint.rs":"0dd974d495c313430898d28b79991a70983c9aa44e88fa9aa1776d3308935438","src/builder/value_parser.rs":"1d731b5bf4e25344ae1de23c474255a310852721ecf66a98c5ef2cbca1452437","src/derive.rs":"cf3e108adf7022ef4a269a0ede687d19f8f549168e1f36c3592fbee40da51e61","src/error/context.rs":"1dc561c7877d7f9b90f04bb7915744f0b3cc4ac2aa928ae100b2825a97077142","src/error/kind.rs":"deba40c24adf04e67e87e383463d103907b7f8cc69f842fd3a5d8d81015d33c1","src/error/mod.rs":"c7bdd28240ee2fac6d9ae2c3d849483fabc3c64d5d577c0bc297c996f122a217","src/lib.rs":"9522f2b17cd505623468c5ff847f5aa906a40ae19dde0329c459a417c2b82a2b","src/macros.rs":"d39619976c3cf3b2b28eef3dfffd449080f4fcfbaa164b01901bf3e10d1a5a07","src/mkeymap.rs":"3565a5bae5d6cdcf8ba41a24eb602c510a14e150c4a6d3085ad72a35778e9c5f","src/output/fmt.rs":"efb741b5854500d946c6c09763ece1badc2b9cd3efa616cb58012039836c2b7f","src/output/help.rs":"ebdd123d6b70279c25af4b08432b547498834853adf99821ff6c6cd65dd87d4e","src/output/mod.rs":"3a61f89a4568e95114a3ab839da8f3c4c92de2a228549308f5d1be076a474917","src/output/usage.rs":"370d3544cf58a09f8d3b0bcc2d894531d7152d716eaffa745a858c6ba2e03b7c","src/parser/arg_matcher.rs":"79ab36a164df07e565d2c44b836f647ee2009463d0d55bd2e822cb72b5e009a7","src/parser/error.rs":"4568fb6b8bb05b43e81c5df4fba5f4cb8b19bfa06e6b8fc6b5af6ca4074766cf","src/parser/features/mod.rs":"6ed075e97af56bff22f22ed1ee83ff6479360e05f9d3661a3145f822c242b694","src/parser/features/suggestions.rs":"79127956b2f1adb9d658925e2779ebebfe9ddea434408762fefb60afdb545f47","src/parser/matches/any_value.rs":"7b6e711fe205e8808394c562dd6a260b56ce350cf9298a308ba9727ab012b664","src/parser/matches/arg_matches.rs":"a24fa086537ef72951821fbf1dc455a04270606ee411685991e79aaae509558c","src/parser/matches/matched_arg.rs":"fb12eb2afaf631bb60aa8c4e42b0f510a877d35a9eaa07a7afd253280c27c251","src/parser/matches/mod.rs":"1467aa752cb1c79d30e4aeaaa55e10a0bb9dcf6f3980496234251431c79c49e6","src/parser/matches/value_source.rs":"e6a477ae36f2f7155960239a97b7d142eef4eb227c41c9eefea147289547d713","src/parser/mod.rs":"358f46d3b7f43dec2563d4c35bd2536fab2491f28e300a9bcdeaf6ca0513ce12","src/parser/parser.rs":"c1339fdf44253b6cbf81fcf71f99bb68300f8d5eb5ab7f0d0d02d222ee63a873","src/parser/validator.rs":"30066cb41ab23800231fb6b028cbce57d118570859659ebc67affbe5226f31f9","src/util/color.rs":"63df5e1cda1001b4c536dc0b04e09dd85dae6d317e34e660abbe3c71e17eaa29","src/util/fnv.rs":"82492d91d990f38b62de8b3c3e67f1fad55919117b1f448aa28acf6d21919fd7","src/util/graph.rs":"f35396b6e2a427377dcbbca69b1b98737d89684a3834cfda98cbf8cc70ff9c2f","src/util/id.rs":"fc498c65887385d92a51359a2f72556c2e508ee49b8cac4b3f827512795d690d","src/util/mod.rs":"8d328a15ef06989d0ce5e65cf3b7ec79c083984b25c0b31ba177bdb22df28a10","src/util/str_to_bool.rs":"1ce90b4939a884eeefc73392722bdfcf906e3070c4398e1557c586c10c684cd0"},"package":"d53da17d37dba964b9b3ecb5c5a1f193a2762c700e6829201e645b9381c99dc7"} \ No newline at end of file
+{"files":{"Cargo.lock":"60560d6b2bec73734ebea64f8b916cbe9361e672157119801ba0e2f89334453c","Cargo.toml":"5def59eada2aa1a035cb39b38da4ba02baec2dd9271e4ef16731a8ef06c4d58f","LICENSE-APACHE":"c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4","LICENSE-MIT":"0d687e1f07b58fe68bda74668ff6326125e5e5efa184cce755cd84ac535b7058","README.md":"ee049ee3ccab683cd3fa7c980db71c22ed8577378433cad5a93c1bc2a9dbe20f","examples/cargo-example-derive.md":"8305e66dd56619ec3a1d116951c893965cc8435574f5bf8baea923492357c626","examples/cargo-example-derive.rs":"a94003c9fadd1a11c35616ea4e5132c768bad08650e207848e1de56bffd86c8f","examples/cargo-example.md":"b7e51be8f05538ae39ce232ef12c873af81ab5abb5740c079d09b7cdd27a3b71","examples/cargo-example.rs":"be19a1ccb9d91882d76e7553f692ef89fa2a7acbbc1500232ce9fb60b6e8a85b","examples/demo.md":"9db305e9ff333f5e783dcc3142683280816d7bc111a57e9dcc4127f07ca44055","examples/demo.rs":"8a18ab15a235b84efd82017e51a891ed2df5f0154adbfce2806dcac089296b64","examples/derive_ref/augment_args.rs":"93fa1e122328a5d12ca4f921d17902dff6ec47b69fb2140124e2a00809ec4a1a","examples/derive_ref/augment_subcommands.rs":"5535f8ca1893101acb5eba8edc311497431ff9aa26f62f1d9743bdc147bef7a4","examples/derive_ref/custom-bool.md":"d92e441199c7584d4b888c45124366cc4802ec8ea67cdcbb3423ffaa3c5268ac","examples/derive_ref/custom-bool.rs":"f88e9c68d2447a24bc98e05124fea17836155f32cff30a2b8a03ad254383247c","examples/derive_ref/flatten_hand_args.rs":"abdb4e55b0cb71e5c4d14fe20ae0930df6888b2dca01225a02d3c6828bcbc791","examples/derive_ref/hand_subcommand.rs":"1a5464b9c5791361930b5591adeb6fcf6f14b83abdfa6443d2c80bcf0c097b3e","examples/derive_ref/interop_tests.md":"3a357e82cfc155f71e0348be33f78295aa77839c3e3a5b7c1783cbd1259e6a61","examples/escaped-positional-derive.md":"64329a454ad399cfde7cae37c2419fb68f1dfcdf2b7d809e113bab69c5f9b947","examples/escaped-positional-derive.rs":"68b0b474509d0d0b19a2ad756c15a18a9d3b30278390ddf1b7bc11b40fe5f937","examples/escaped-positional.md":"a8259da128ad7ad1f898527bb9e3c1c55541fdc2a59a8599fcddbe9cf58a3563","examples/escaped-positional.rs":"ca33f37267df8de835eeb5817e906a957e96c4ee9bd95b97abee3af25639f3c2","examples/git-derive.md":"280909b56757f102cad3a3274a92c884a0cec4e698c0f8718d2edee73fbbd810","examples/git-derive.rs":"2e8310364f2622b1b11c916643dda7392ec4a4fd585f30d537672d2fed48ea6e","examples/git.md":"31c172433b05ce581179aaba10d610de5cf097b0da894f1330a0437ef332feab","examples/git.rs":"9da386531604fc2afbd375685e213200ad10e34100ec92b4bfa6fb5730283aa1","examples/multicall-busybox.md":"0e07a2f79f94daf4586db85bf207b4bd8f0653b59858d6b4f0b66956a5b2178f","examples/multicall-busybox.rs":"709f71a82295a539d0a239371d35d1eeb517eaa3bb0a4db406bb7e5d3541a4a5","examples/multicall-hostname.md":"b547e42135269ab1e8be8dea4da6a4e99dfaa006a320fa319198d5934e1e97ab","examples/multicall-hostname.rs":"cc58a924dd2e57281f36e30481a1cbc8186952adbf149f9e1e13f9c673614fd9","examples/pacman.md":"c91e1582caf8a2cdeca208c856d1ede3f3ff26948b288a98ef69ea695f12f555","examples/pacman.rs":"f249824b950e1c34fae37afe04389143a037452a1f699c215172ac20e0285984","examples/repl.rs":"d50c1da634c237b26989994b1efa6fd1a087874a82d1fc8c1863be4ea8deaa8c","examples/tutorial_builder/01_quick.md":"80878c8630e0ecf7bb172c2645c2c17480ca5a37e5f4f481ab99e88d3a37da8e","examples/tutorial_builder/01_quick.rs":"c19b165fce9468fb3c9d3d9354a2b9829ceea7ffba6b7134d4941a6e986429a9","examples/tutorial_builder/02_app_settings.md":"f0f7b48afa7a97c9270f9d63a0e9e0f3117733ee0201639eae2199a4aca4944e","examples/tutorial_builder/02_app_settings.rs":"dd770d131726c3f37e202c9b10c969cc4eba90249c54a05594535cea6efe2749","examples/tutorial_builder/02_apps.md":"815a9197925d403b1d93969ace87e80e32667333fa83f2c86abcbdfa17cf0d7e","examples/tutorial_builder/02_apps.rs":"a7016469d10259ae0025fb6ad5b9d3c732cf082869348005d4774d2bb0722d2d","examples/tutorial_builder/02_crate.md":"086581912b34d305bb7cf3c5a35238c151bd366fac4c0923057883253731c250","examples/tutorial_builder/02_crate.rs":"2742c6a3f1946b89b4f1146893e126d68e1cf55ad4130fb94105091900421273","examples/tutorial_builder/03_01_flag_bool.md":"068378b1e76ce624dd0153dfaa9a7ae2d1a84205b1e169f5f1a16bebd50715cf","examples/tutorial_builder/03_01_flag_bool.rs":"d49b30b527faa6a383b334e572d546fab5c4b298a5549842073ab42a33a05c94","examples/tutorial_builder/03_01_flag_count.md":"8d62fbef076eac962a1d0082afa4916de22277aee973d693de33e9fd73b16669","examples/tutorial_builder/03_01_flag_count.rs":"2bfaac3aa9bcbbf37e18e74a40d966391e208d44b45a1e9c4ab61d22fd14dd40","examples/tutorial_builder/03_02_option.md":"585793524138da00c25b9fdd883b25eb8addfaf8742365d84cde63169a9289a7","examples/tutorial_builder/03_02_option.rs":"ce43934605e0438f1e8706e5e970cfcd930f76c4ebee02450ffc63de520994bd","examples/tutorial_builder/03_03_positional.md":"46fe5085841342243efd9614e80db7db3c52ae5af7c6cdd402b569d310e63fe9","examples/tutorial_builder/03_03_positional.rs":"fc7538d0fe8501c56070f0f22be699f128890636aa4ff8478cd6c7beeea279da","examples/tutorial_builder/03_04_subcommands.md":"fc5a92c5290b3cc119a6421779cdd8f4791465a1d3f50f4f29ccb08f3063a6f5","examples/tutorial_builder/03_04_subcommands.rs":"a309a332004edbed6dc14b64b1ba6cc0cd42871f3c5b8da7daab772764839c68","examples/tutorial_builder/03_05_default_values.md":"431800610a29d9a5587b74b30d709e67af5a0b8980900de20e5876fb9491144c","examples/tutorial_builder/03_05_default_values.rs":"b277be9cfe5d87958f9cf2e8a178bb007b070723528bedc8b81163aedb3a2880","examples/tutorial_builder/04_01_enum.md":"d1310efc5c8acb5ca9c86b57deebbcbd8766869284d2e8ea51e32b3eeac38439","examples/tutorial_builder/04_01_enum.rs":"596aa44bc401674a4ccf091b81b2df79b911dbb01d61fd167fd270d1e21a3609","examples/tutorial_builder/04_01_possible.md":"308cd6530b3c389bf2a82b2b66ad33025be230d84d94835273af35a90eb6a753","examples/tutorial_builder/04_01_possible.rs":"3d781b26d257061b55a957744c2dbd99c1d2346c151230fb18fe5f576d19585c","examples/tutorial_builder/04_02_parse.md":"ea14a355913fd7a8af5aac4be2bdecfda72c039b62ccadfb91ff8d39a447955e","examples/tutorial_builder/04_02_parse.rs":"a65f596341e65f41d555b38a6f5e22a5e03aac6faa4e8b3e3c85fa0e0935a2d7","examples/tutorial_builder/04_02_validate.md":"7536f4fb1a11ab94e54b6b98b7364c77912b7600803aeda5988c5b29f3f037c8","examples/tutorial_builder/04_02_validate.rs":"af6d9f748c6956aaa1006ce96834e0d013a9dbfb6d0acc63df5eb63caac56eef","examples/tutorial_builder/04_03_relations.md":"ffc6b8a2d606856fbb6cce677c5280e08eaffbe6a4c8e40cd68ce35959370ed7","examples/tutorial_builder/04_03_relations.rs":"a2dbb6d77587f64775ef57c4bb3869a2760e5c124e2870898bbf1191ef349b99","examples/tutorial_builder/04_04_custom.md":"d562fd072b5d91e8ea145771a2b6eb0284d3d21bfac707ba48ee00e92d76ad2d","examples/tutorial_builder/04_04_custom.rs":"ea0879629da2dab2d2e7fd25bdde53386d863a3e2d468e7ea306a6f8240a5522","examples/tutorial_builder/05_01_assert.rs":"69fc5a3d330be1f90055f886d65684204d7f0585459f362cf3c43b5caf4bbd7b","examples/tutorial_derive/01_quick.md":"1416029b09409468ba6b39ae5f91c41547f7f389c2534961f867ab17260638da","examples/tutorial_derive/01_quick.rs":"e17262c915199c4507d8950d5eafb73f3047e09b6dee2abbfe9f82ebf1b7ddd5","examples/tutorial_derive/02_app_settings.md":"3f4a81ebc7b674482768763bab70acf9bc31f68cc3ecb118c6f5493feaff3d42","examples/tutorial_derive/02_app_settings.rs":"7e81f4c1640b0bfbd87aedd3eda79ae7c47c669dee79b643b35e54c1dc076ee8","examples/tutorial_derive/02_apps.md":"27d22d45e438f60b346d34508a75783871e0fe9b1ae41ec759e56118a10feff7","examples/tutorial_derive/02_apps.rs":"e8cd02b5983b2203f1585b96858fade4cedfb124e366171d6b21fcb3f05b514e","examples/tutorial_derive/02_crate.md":"eb396e17db1dd68eb7689bcd806b63dbfe01ad48dfc12c285f00c42e1d4b8c1f","examples/tutorial_derive/02_crate.rs":"0b12a0790d23cee1e5d275893f428cc0af36d5532c2af00806e64c18ef9d309c","examples/tutorial_derive/03_01_flag_bool.md":"f6dd5ab050f0f1ac5924949a4ba45f248b2d4b1bd77210d78b9d8e9b3395d111","examples/tutorial_derive/03_01_flag_bool.rs":"07c31218d0332d7437d80e19c7e3c7be711bf0f56bee3ffb1c4d6f7f253b9304","examples/tutorial_derive/03_01_flag_count.md":"74d5c8a79581ceb7e6a11ec20ae59fa8c7f42591e10464aad50bbdd3d06916fc","examples/tutorial_derive/03_01_flag_count.rs":"945be42994845145b9c579b3834f8c6375f239293ded84fba35754bbe9fdcf9b","examples/tutorial_derive/03_02_option.md":"034b65008d05c1598fe3c1918f23d654d7a14cb610dd636a3c649d9d7a3b1559","examples/tutorial_derive/03_02_option.rs":"48be4cf49b498173200ad86d5d3cd64ce9381f86fdaaab70f05fc471f64a2185","examples/tutorial_derive/03_03_positional.md":"14f6b36eee218a38733b534e7b621f68a6f799bd96682a82980cba9f6e99a40e","examples/tutorial_derive/03_03_positional.rs":"f368ab1465ee4d84b84d175b97af6f64ce0676bec2482adef3ce966d2d8de26a","examples/tutorial_derive/03_04_subcommands.md":"3e1870fb10c78a01b63903060b1164f3f4d0e51c052e449abe11e2d06c252811","examples/tutorial_derive/03_04_subcommands.rs":"b25c8aec8f3816923b1154be91caafe0c2d2841fc1af5f0ef048f03d1273879e","examples/tutorial_derive/03_04_subcommands_alt.rs":"7ba6e81c2af6085b7e2721254500b34ee3e8622e20790b3c6f2786e165151b70","examples/tutorial_derive/03_05_default_values.md":"9ac52230ba7d9c214dcb64922cbf161970947d9650e8e7ea8d0ee949eba99c0e","examples/tutorial_derive/03_05_default_values.rs":"0ba14153a3c72a2435ac3688b990171a1670eb3f2f7cef21886732e489fad435","examples/tutorial_derive/04_01_enum.md":"ee57dc12a88a560d70f344629ac79cc497f96e967e97b4c643467747c8075172","examples/tutorial_derive/04_01_enum.rs":"d30abd8570357be26871c06939dee8173d34408250b6bdc3b1e76f1cbc06f888","examples/tutorial_derive/04_02_parse.md":"f191e6c77e6b133f78bd1123cec2b09c8dfe8bb17198d6348e26adade7465daf","examples/tutorial_derive/04_02_parse.rs":"fbb23ef2d98d3cb401cec9dd29d5818e4c189cc9f54fe961a2fbd08632a9634c","examples/tutorial_derive/04_02_validate.md":"c88670017d06261d454818ff18f21a06275f35d564e637c5346ce3b7fca8a02b","examples/tutorial_derive/04_02_validate.rs":"87d9c465f912b69e5839ea87404a221a39421404012c1a7fd6e327b03ceb12f0","examples/tutorial_derive/04_03_relations.md":"5657bbeee193f21a312db682cfa216f1001a94ace024c56a959985feb2e29069","examples/tutorial_derive/04_03_relations.rs":"eb8e737733261d3d1b7f4def7a05c37ba7c1c010357c7de33ee42c8adfdf6dc2","examples/tutorial_derive/04_04_custom.md":"9627d0025c5c063682387d8e00b3fb097114d1431c1ce8808038be34f781576a","examples/tutorial_derive/04_04_custom.rs":"0e745c6dab0881c62190e82e01409b70cf3286dd0983db4a612f1be88fdd1a8d","examples/tutorial_derive/05_01_assert.rs":"653450ff2e528f29b6b31d979fd7da094ea8e74b8b61a4657935c9ac2efbc28e","examples/typed-derive.md":"c22bb8da2e294f1d3725624e0c442713e5f263b10a2ee76a22ffa07f89af735a","examples/typed-derive.rs":"1c88bb1c8cec4e2e7a452552fa52675d96ffd6f201f5384b4e98d0a70fce1e4c","src/_cookbook/cargo_example.rs":"fe7594a5233e9106a159aa1f5d5f0cde0d844356f630d55c78b8ef322327d4e5","src/_cookbook/cargo_example_derive":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/_cookbook/cargo_example_derive.rs":"badf3e931ef5d5b7f5addc4912aca057ba83ee6302c43d7eeecd1661673fd407","src/_cookbook/escaped_positional.rs":"2789d8fea126355805b29e76b52c6cea4982565014087a46e0d48e4ddfbed7ab","src/_cookbook/escaped_positional_derive.rs":"802d0b672f4ed48152235d4a26a64c97fa921b361177bdd3a1a33cbac96f665d","src/_cookbook/git.rs":"372977252a22fc776e3acaa4629e964114ccd6a49b8ef334d2b6646f12e8b5ee","src/_cookbook/git_derive.rs":"4ab7c0197efda06607ca60c2a85ea743aed3494f5fe9e408d935ea0500a345fc","src/_cookbook/mod.rs":"34c53c6273512976676a82dded921f8d99e0312dd3e823ae1549606754625827","src/_cookbook/multicall_busybox.rs":"56176b4fa15e7a39c433706971d4e68aaf26ddc2a5790078b6dbe722ee13efee","src/_cookbook/multicall_hostname.rs":"907f8decf81ea4d4cbf81639ea4cd2f925eda64d4831454a7656369b65522780","src/_cookbook/pacman.rs":"863125b2d3d7931a9e4541c8ab1242b8bfcb421d8b5c604ea681efd805f68da7","src/_cookbook/repl.rs":"1393209b2cc5c203296d57c5a065b764b4318be7855e48baf16de851e250cf90","src/_cookbook/typed_derive.rs":"3d28e78cd0b068b4fcb32a7fea6244de176f2fe75dfcb59e99c33b66a7ae4864","src/_derive/_tutorial.rs":"237d316ad5f9838dc011283e454afce24d47bf2e9c5038ba5402bafeb2959090","src/_derive/mod.rs":"7f1f6b59332044681324f0753dfb51641e52f46dee74a21b8c94a413bc06be02","src/_faq.rs":"06d10de865ae34305fa973db9b00dc31f54e0f63f8fe039805aa371c36a796b9","src/_features.rs":"bbcbf1b256136d20f89e4f8a16ff37b04f07dfee0d2d4f2b013f445467628032","src/_tutorial.rs":"e7c7359b6b6c86cf6e18f4bdc3c90ce440b82bf07ce304ca2e127fb2a04cbf9f","src/bin/stdio-fixture.rs":"e8f10afbfe1857bcf986d2f55be0ca19a50c905d9f650c6e1fd42dbacf219b04","src/builder/action.rs":"beab4d8dca6337dfd64f387ee3198a88a6dcb71ec94f5bbbfe6bb4c0175ab9ee","src/builder/app_settings.rs":"17b094a5c044b2387467706bade1b19b5703bf99fc5081ac9508f410f871a1f2","src/builder/arg.rs":"e7120b60bf72d2572fc1f325b377a32da9ece4d7ac00b4a580a0f6a42c08ea8a","src/builder/arg_group.rs":"263d9c79e03015fe4e2fab4616fc73089be60fb2ec17aa2a06f3d6a24740432c","src/builder/arg_predicate.rs":"8c9fd14780cd42465f32f2e8927b97c06e686d09b5927ba3cd5bbd792af7a13d","src/builder/arg_settings.rs":"b7966dfea529a1be1164ca2d76494b1712cb2f73b024d2a23307dcd473933887","src/builder/command.rs":"57f0076465feb3cf6a0a16610b345fae8dbde8d248e4ef94111a27051c40789b","src/builder/debug_asserts.rs":"d1d5adc82cb8269445b2ef197f1e566f61e7f13d6a24afaad928e45e95aed170","src/builder/macros.rs":"904e42e72c49107ae324f45d5df24fbff13b9c7d4589f1a4ae38594add704434","src/builder/mod.rs":"205367cb5ba5d5ba7894091535ce3a5dd23b35fd436e003196d89523e7705566","src/builder/possible_value.rs":"62268b9da9eec8f4d1904ebfbd3a288fb78cfa71c357efadced28f0378bcfb93","src/builder/regex.rs":"b18891310186ecdcca9bb611833b7188cc80fe72e9fef27b63fa076b880a1acb","src/builder/tests.rs":"995c7d6be608b94c6f392f1356eba0cb8adb9ca661ffeebf7ebe6e8ad01a868c","src/builder/usage_parser.rs":"91d1af89196116aac2c0fb021f42f43f954aa3252df264e19a02a0cf5911d16b","src/builder/value_hint.rs":"0dd974d495c313430898d28b79991a70983c9aa44e88fa9aa1776d3308935438","src/builder/value_parser.rs":"64bb7f4808bdf65f30cb434198038a06db556e5ca045d900da392cc1a3186896","src/derive.rs":"11eaddc27a06229322a6bbce4458cb1424e6a5805c79166cba342c2905093b51","src/error/context.rs":"1dc561c7877d7f9b90f04bb7915744f0b3cc4ac2aa928ae100b2825a97077142","src/error/kind.rs":"3b4f9dfe5be5843cec8380c8f8965dcb9d0beee0aaa02cadf8dcffd400626ede","src/error/mod.rs":"e5b60fee401975d95c460c2567d09e17972eaae336154a8b90d9c806083f63fa","src/lib.rs":"4a197eab3f447c58a266af4f9a787af5c98b18f4612f33d9189cce52f4f9de18","src/macros.rs":"72585e32051a6872bbb29e39f7e9f9a88334a03f39ec3c768984db2f38211001","src/mkeymap.rs":"3565a5bae5d6cdcf8ba41a24eb602c510a14e150c4a6d3085ad72a35778e9c5f","src/output/fmt.rs":"efb741b5854500d946c6c09763ece1badc2b9cd3efa616cb58012039836c2b7f","src/output/help.rs":"ebdd123d6b70279c25af4b08432b547498834853adf99821ff6c6cd65dd87d4e","src/output/mod.rs":"3a61f89a4568e95114a3ab839da8f3c4c92de2a228549308f5d1be076a474917","src/output/usage.rs":"1921d2fa362f111b3f9613fc98eb5e24686483fe112b337855da7eb17b643f71","src/parser/arg_matcher.rs":"0c9ae639ed241e8ff1f62cd9e5eab2de9e5db1be0e86f58d5d94619d6dad05fd","src/parser/error.rs":"51e8fbd7cc73bba78cca50417e9b4fb25e11eefc60ff4b957940176bdb995e5c","src/parser/features/mod.rs":"6ed075e97af56bff22f22ed1ee83ff6479360e05f9d3661a3145f822c242b694","src/parser/features/suggestions.rs":"79127956b2f1adb9d658925e2779ebebfe9ddea434408762fefb60afdb545f47","src/parser/matches/any_value.rs":"7b6e711fe205e8808394c562dd6a260b56ce350cf9298a308ba9727ab012b664","src/parser/matches/arg_matches.rs":"666e3640b5347aba5806fc15b5caa599b171e684ee15d933ddc7f8185a0d2032","src/parser/matches/matched_arg.rs":"fb12eb2afaf631bb60aa8c4e42b0f510a877d35a9eaa07a7afd253280c27c251","src/parser/matches/mod.rs":"1467aa752cb1c79d30e4aeaaa55e10a0bb9dcf6f3980496234251431c79c49e6","src/parser/matches/value_source.rs":"e6a477ae36f2f7155960239a97b7d142eef4eb227c41c9eefea147289547d713","src/parser/mod.rs":"358f46d3b7f43dec2563d4c35bd2536fab2491f28e300a9bcdeaf6ca0513ce12","src/parser/parser.rs":"9e338dfd60aa8bfbcfbbda15c73d4722767a4d2e7b8f8ed3a07c296ddd98762c","src/parser/validator.rs":"30066cb41ab23800231fb6b028cbce57d118570859659ebc67affbe5226f31f9","src/util/color.rs":"63df5e1cda1001b4c536dc0b04e09dd85dae6d317e34e660abbe3c71e17eaa29","src/util/fnv.rs":"82492d91d990f38b62de8b3c3e67f1fad55919117b1f448aa28acf6d21919fd7","src/util/graph.rs":"f35396b6e2a427377dcbbca69b1b98737d89684a3834cfda98cbf8cc70ff9c2f","src/util/id.rs":"fc498c65887385d92a51359a2f72556c2e508ee49b8cac4b3f827512795d690d","src/util/mod.rs":"8d328a15ef06989d0ce5e65cf3b7ec79c083984b25c0b31ba177bdb22df28a10","src/util/str_to_bool.rs":"1ce90b4939a884eeefc73392722bdfcf906e3070c4398e1557c586c10c684cd0"},"package":"23b71c3ce99b7611011217b366d923f1d0a7e07a92bb2dbf1e84508c673ca3bd"} \ No newline at end of file
diff --git a/vendor/clap/Cargo.lock b/vendor/clap/Cargo.lock
index 269dea5ad..57d007104 100644
--- a/vendor/clap/Cargo.lock
+++ b/vendor/clap/Cargo.lock
@@ -45,9 +45,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "backtrace"
-version = "0.3.65"
+version = "0.3.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61"
+checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7"
dependencies = [
"addr2line",
"cc",
@@ -66,9 +66,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bytes"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
+checksum = "f0b3de4a0c5e67e16066a0715723abd91edc2f9001d09c46e1dca929351e130e"
[[package]]
name = "cc"
@@ -84,7 +84,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clap"
-version = "3.2.5"
+version = "3.2.20"
dependencies = [
"atty",
"backtrace",
@@ -98,6 +98,7 @@ dependencies = [
"rustversion",
"shlex",
"snapbox",
+ "static_assertions",
"strsim",
"termcolor",
"terminal_size",
@@ -110,9 +111,9 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "3.2.5"
+version = "3.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c11d40217d16aee8508cc8e5fde8b4ff24639758608e5374e731b53f85749fb9"
+checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
dependencies = [
"heck",
"proc-macro-error",
@@ -123,9 +124,9 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.2.2"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613"
+checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
dependencies = [
"os_str_bytes",
]
@@ -159,9 +160,9 @@ checksum = "d6417fe6fc03a8b533fd2177742eeb39a90c7233eedec7bac96d4d6b69a09449"
[[package]]
name = "crossbeam-channel"
-version = "0.5.4"
+version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53"
+checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c"
dependencies = [
"cfg-if",
"crossbeam-utils",
@@ -180,33 +181,33 @@ dependencies = [
[[package]]
name = "crossbeam-epoch"
-version = "0.9.8"
+version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c"
+checksum = "07db9d94cbd326813772c968ccd25999e5f8ae22f4f8d1b11effa37ef6ce281d"
dependencies = [
"autocfg",
"cfg-if",
"crossbeam-utils",
- "lazy_static",
"memoffset",
+ "once_cell",
"scopeguard",
]
[[package]]
name = "crossbeam-utils"
-version = "0.8.8"
+version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"
+checksum = "7d82ee10ce34d7bc12c2122495e7593a9c41347ecdd64185af4ecf72cb1a7f83"
dependencies = [
"cfg-if",
- "lazy_static",
+ "once_cell",
]
[[package]]
name = "either"
-version = "1.6.1"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
+checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be"
[[package]]
name = "escargot"
@@ -222,9 +223,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.26.1"
+version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
+checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"
[[package]]
name = "glob"
@@ -234,9 +235,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "hashbrown"
-version = "0.11.2"
+version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "heck"
@@ -271,9 +272,9 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "1.8.1"
+version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
+checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
dependencies = [
"autocfg",
"hashbrown",
@@ -290,27 +291,21 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
-
-[[package]]
-name = "lazy_static"
-version = "1.4.0"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d"
[[package]]
name = "libc"
-version = "0.2.125"
+version = "0.2.126"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b"
+checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
[[package]]
name = "linked-hash-map"
-version = "0.5.4"
+version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
+checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]]
name = "log"
@@ -338,9 +333,9 @@ dependencies = [
[[package]]
name = "miniz_oxide"
-version = "0.5.1"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082"
+checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc"
dependencies = [
"adler",
]
@@ -363,18 +358,18 @@ dependencies = [
[[package]]
name = "object"
-version = "0.28.3"
+version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456"
+checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
-version = "1.12.0"
+version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225"
+checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1"
[[package]]
name = "os_pipe"
@@ -418,27 +413,27 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.37"
+version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"
+checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7"
dependencies = [
- "unicode-xid",
+ "unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.18"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
+checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rayon"
-version = "1.5.2"
+version = "1.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd249e82c21598a9a426a4e00dd7adc1d640b22445ec8545feef801d1a74c221"
+checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d"
dependencies = [
"autocfg",
"crossbeam-deque",
@@ -448,9 +443,9 @@ dependencies = [
[[package]]
name = "rayon-core"
-version = "1.9.2"
+version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f51245e1e62e1f1629cbfec37b5793bbabcaeb90f30e94d2ba03564687353e4"
+checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f"
dependencies = [
"crossbeam-channel",
"crossbeam-deque",
@@ -460,9 +455,9 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.5.5"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
+checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"
dependencies = [
"aho-corasick",
"memchr",
@@ -471,9 +466,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
-version = "0.6.25"
+version = "0.6.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
+checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
[[package]]
name = "rustc-demangle"
@@ -483,15 +478,15 @@ checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
[[package]]
name = "rustversion"
-version = "1.0.6"
+version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f"
+checksum = "24c8ad4f0c00e1eb5bc7614d236a7f1300e3dbd76b68cac8e06fb00b015ad8d8"
[[package]]
name = "ryu"
-version = "1.0.9"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
+checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695"
[[package]]
name = "scopeguard"
@@ -501,18 +496,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
name = "serde"
-version = "1.0.137"
+version = "1.0.139"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
+checksum = "0171ebb889e45aa68b44aee0859b3eede84c6f5f5c228e6f140c0b2a0a46cad6"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.137"
+version = "1.0.139"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be"
+checksum = "dc1d3230c1de7932af58ad8ffbe1d784bd55efd5a9d84ac24f69c72d83543dfb"
dependencies = [
"proc-macro2",
"quote",
@@ -521,9 +516,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.81"
+version = "1.0.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c"
+checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7"
dependencies = [
"itoa",
"ryu",
@@ -564,6 +559,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c01dea7e04cbb27ef4c86e9922184608185f7cd95c1763bc30d727cda4a5e930"
[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
name = "strsim"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -571,13 +572,13 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "syn"
-version = "1.0.92"
+version = "1.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52"
+checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd"
dependencies = [
"proc-macro2",
"quote",
- "unicode-xid",
+ "unicode-ident",
]
[[package]]
@@ -620,9 +621,9 @@ dependencies = [
[[package]]
name = "toml_edit"
-version = "0.14.3"
+version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba98375fd631b83696f87c64e4ed8e29e6a1f3404d6aed95fa95163bad38e705"
+checksum = "5376256e44f2443f8896ac012507c19a012df0fe8758b55246ae51a2279db51f"
dependencies = [
"combine",
"indexmap",
@@ -632,9 +633,9 @@ dependencies = [
[[package]]
name = "trybuild"
-version = "1.0.61"
+version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fc92f558afb6d1d7c6f175eb8d615b8ef49c227543e68e19c123d4ee43d8a7d"
+checksum = "764b9e244b482a9b81bde596aa37aa6f1347bf8007adab25e59f901b32b4e0a0"
dependencies = [
"glob",
"once_cell",
@@ -672,16 +673,16 @@ dependencies = [
]
[[package]]
-name = "unicode-width"
-version = "0.1.9"
+name = "unicode-ident"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
+checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7"
[[package]]
-name = "unicode-xid"
-version = "0.2.3"
+name = "unicode-width"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04"
+checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
[[package]]
name = "version_check"
diff --git a/vendor/clap/Cargo.toml b/vendor/clap/Cargo.toml
index aba082f3a..197454c07 100644
--- a/vendor/clap/Cargo.toml
+++ b/vendor/clap/Cargo.toml
@@ -11,9 +11,9 @@
[package]
edition = "2021"
-rust-version = "1.56.0"
+rust-version = "1.56.1"
name = "clap"
-version = "3.2.5"
+version = "3.2.20"
include = [
"build.rs",
"src/**/*",
@@ -24,7 +24,6 @@ include = [
"examples/**/*",
]
description = "A simple to use, efficient, and full-featured Command Line Argument Parser"
-documentation = "https://docs.rs/clap/"
readme = "README.md"
keywords = [
"argument",
@@ -91,27 +90,6 @@ replace = """
[Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD"""
exactly = 1
-[[package.metadata.release.pre-release-replacements]]
-file = "README.md"
-search = "github.com/clap-rs/clap/blob/[^/]+/"
-replace = "github.com/clap-rs/clap/blob/{{tag_name}}/"
-exactly = 13
-prerelease = true
-
-[[package.metadata.release.pre-release-replacements]]
-file = "README.md"
-search = 'version = "[a-z0-9\.-]+"'
-replace = "version = \"{{version}}\""
-exactly = 1
-prerelease = true
-
-[[package.metadata.release.pre-release-replacements]]
-file = "src/derive.rs"
-search = "github.com/clap-rs/clap/blob/[^/]+/"
-replace = "github.com/clap-rs/clap/blob/{{tag_name}}/"
-exactly = 4
-prerelease = true
-
[profile.bench]
lto = true
codegen-units = 1
@@ -219,10 +197,7 @@ required-features = ["cargo"]
[[example]]
name = "04_01_enum"
path = "examples/tutorial_builder/04_01_enum.rs"
-required-features = [
- "cargo",
- "derive",
-]
+required-features = ["cargo"]
[[example]]
name = "04_02_parse"
@@ -373,7 +348,7 @@ optional = true
version = "1.2"
[dependencies.clap_derive]
-version = "=3.2.5"
+version = "=3.2.18"
optional = true
[dependencies.clap_lex]
@@ -430,6 +405,9 @@ version = "1.1.0"
[dev-dependencies.snapbox]
version = "0.2.9"
+[dev-dependencies.static_assertions]
+version = "1.1.0"
+
[dev-dependencies.trybuild]
version = "1.0.18"
diff --git a/vendor/clap/LICENSE-MIT b/vendor/clap/LICENSE-MIT
index 5acedf041..7b05b8453 100644
--- a/vendor/clap/LICENSE-MIT
+++ b/vendor/clap/LICENSE-MIT
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2015-2016 Kevin B. Knapp
+Copyright (c) 2015-2022 Kevin B. Knapp and Clap Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/clap/README.md b/vendor/clap/README.md
index 48b7a3cbd..eea6ba6f0 100644
--- a/vendor/clap/README.md
+++ b/vendor/clap/README.md
@@ -1,160 +1,24 @@
-<!-- omit in TOC -->
# clap
> **Command Line Argument Parser for Rust**
[![Crates.io](https://img.shields.io/crates/v/clap?style=flat-square)](https://crates.io/crates/clap)
[![Crates.io](https://img.shields.io/crates/d/clap?style=flat-square)](https://crates.io/crates/clap)
-[![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](https://github.com/clap-rs/clap/blob/v3.2.5/LICENSE-APACHE)
-[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](https://github.com/clap-rs/clap/blob/v3.2.5/LICENSE-MIT)
+[![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](LICENSE-APACHE)
+[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE-MIT)
[![Build Status](https://img.shields.io/github/workflow/status/clap-rs/clap/CI/staging?style=flat-square)](https://github.com/clap-rs/clap/actions/workflows/ci.yml?query=branch%3Astaging)
[![Coverage Status](https://img.shields.io/coveralls/github/clap-rs/clap/master?style=flat-square)](https://coveralls.io/github/clap-rs/clap?branch=master)
[![Contributors](https://img.shields.io/github/contributors/clap-rs/clap?style=flat-square)](https://github.com/clap-rs/clap/graphs/contributors)
Dual-licensed under [Apache 2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT).
-1. [About](#about)
-2. Tutorial: [Builder API](https://github.com/clap-rs/clap/blob/v3.2.5/examples/tutorial_builder/README.md), [Derive API](https://github.com/clap-rs/clap/blob/v3.2.5/examples/tutorial_derive/README.md)
-3. [Examples](https://github.com/clap-rs/clap/blob/v3.2.5/examples/README.md)
-4. [API Reference](https://docs.rs/clap)
- - [Derive Reference](https://github.com/clap-rs/clap/blob/v3.2.5/examples/derive_ref/README.md)
- - [Feature Flags](#feature-flags)
-5. [CHANGELOG](https://github.com/clap-rs/clap/blob/v3.2.5/CHANGELOG.md)
-6. [FAQ](https://github.com/clap-rs/clap/blob/v3.2.5/docs/FAQ.md)
-7. [Questions & Discussions](https://github.com/clap-rs/clap/discussions)
-8. [Contributing](https://github.com/clap-rs/clap/blob/v3.2.5/CONTRIBUTING.md)
-8. [Sponsors](#sponsors)
-
## About
Create your command-line parser, with all of the bells and whistles, declaratively or procedurally.
-### Example
-
-This uses our
-[Derive API](https://github.com/clap-rs/clap/blob/v3.2.5/examples/tutorial_derive/README.md)
-which provides access to the [Builder API](https://github.com/clap-rs/clap/blob/v3.2.5/examples/tutorial_builder/README.md) as attributes on a `struct`:
-
-<!-- Copied from examples/demo.{rs,md} -->
-```rust,no_run
-use clap::Parser;
-
-/// Simple program to greet a person
-#[derive(Parser, Debug)]
-#[clap(author, version, about, long_about = None)]
-struct Args {
- /// Name of the person to greet
- #[clap(short, long, value_parser)]
- name: String,
-
- /// Number of times to greet
- #[clap(short, long, value_parser, default_value_t = 1)]
- count: u8,
-}
-
-fn main() {
- let args = Args::parse();
-
- for _ in 0..args.count {
- println!("Hello {}!", args.name)
- }
-}
-```
-Add this to `Cargo.toml`:
-```toml
-[dependencies]
-clap = { version = "3.2.5", features = ["derive"] }
-```
-```bash
-$ demo --help
-clap [..]
-Simple program to greet a person
-
-USAGE:
- demo[EXE] [OPTIONS] --name <NAME>
-
-OPTIONS:
- -c, --count <COUNT> Number of times to greet [default: 1]
- -h, --help Print help information
- -n, --name <NAME> Name of the person to greet
- -V, --version Print version information
-```
-*(version number and `.exe` extension on windows replaced by placeholders)*
-
-### Aspirations
-
-- Out of the box, users get a polished CLI experience
- - Including common argument behavior, help generation, suggested fixes for users, colored output, [shell completions](https://github.com/clap-rs/clap/tree/master/clap_complete), etc
-- Flexible enough to port your existing CLI interface
- - However, we won't necessarily streamline support for each use case
-- Reasonable parse performance
-- Resilient maintainership, including
- - Willing to break compatibility rather than batching up breaking changes in large releases
- - Leverage feature flags to keep to one active branch
- - Being under [WG-CLI](https://github.com/rust-cli/team/) to increase the bus factor
-- We follow semver and will wait about 6-9 months between major breaking changes
-- We will support the last two minor Rust releases (MSRV, currently 1.56.0)
-
-While these aspirations can be at odds with fast build times and low binary
-size, we will still strive to keep these reasonable for the flexibility you
-get. Check out the
-[argparse-benchmarks](https://github.com/rust-cli/argparse-benchmarks-rs) for
-CLI parsers optimized for other use cases.
-
-### Selecting an API
-
-Why use the declarative [Derive API](https://github.com/clap-rs/clap/blob/v3.2.5/examples/tutorial_derive/README.md):
-- Easier to read, write, and modify
-- Easier to keep the argument declaration and reading of argument in sync
-- Easier to reuse, e.g. [clap-verbosity-flag](https://crates.io/crates/clap-verbosity-flag)
-
-Why use the procedural [Builder API](https://github.com/clap-rs/clap/blob/v3.2.5/examples/tutorial_builder/README.md):
-- Faster compile times if you aren't already using other procedural macros
-- More flexible, e.g. you can look up how many times an argument showed up,
- what its values were, and what were the indexes of those values. The Derive
- API can only report presence, number of occurrences, or values but no indices
- or combinations of data.
-
-### Related Projects
-
-- [wild](https://crates.io/crates/wild) for supporting wildcards (`*`) on Windows like you do Linux
-- [argfile](https://crates.io/crates/argfile) for loading additional arguments from a file (aka response files)
-- [shadow-rs](https://crates.io/crates/shadow-rs) for generating `Command::long_version`
-- [clap_lex](https://crates.io/crates/clap_lex) for a lighter-weight, battle-tested CLI parser
-- [clap_mangen](https://crates.io/crates/clap_mangen) for generating man page source (roff)
-- [clap_complete](https://crates.io/crates/clap_complete) for shell completion support
-- [clap-verbosity-flag](https://crates.io/crates/clap-verbosity-flag)
-- [clap-cargo](https://crates.io/crates/clap-cargo)
-- [concolor-clap](https://crates.io/crates/concolor-clap)
-- [Command-line Apps for Rust](https://rust-cli.github.io/book/index.html) book
-- [`trycmd`](https://crates.io/crates/trycmd): Snapshot testing
- - Or for more control, [`assert_cmd`](https://crates.io/crates/assert_cmd) and [`assert_fs`](https://crates.io/crates/assert_fs)
-
-## Feature Flags
-
-### Default Features
-
-* **std**: _Not Currently Used._ Placeholder for supporting `no_std` environments in a backwards compatible manner.
-* **color**: Turns on colored error messages.
-* **suggestions**: Turns on the `Did you mean '--myoption'?` feature for when users make typos.
-
-#### Optional features
-
-* **deprecated**: Guided experience to prepare for next breaking release (at different stages of development, this may become default)
-* **derive**: Enables the custom derive (i.e. `#[derive(Parser)]`). Without this you must use one of the other methods of creating a `clap` CLI listed above.
-* **cargo**: Turns on macros that read values from `CARGO_*` environment variables.
-* **env**: Turns on the usage of environment variables during parsing.
-* **regex**: Enables regex validators.
-* **unicode**: Turns on support for unicode characters (including emoji) in arguments and help messages.
-* **wrap_help**: Turns on the help text wrapping feature, based on the terminal size.
-
-#### Experimental features
-
-**Warning:** These may contain breaking changes between minor releases.
-
-* **unstable-replace**: Enable [`Command::replace`](https://github.com/clap-rs/clap/issues/2836)
-* **unstable-grouped**: Enable [`ArgMatches::grouped_values_of`](https://github.com/clap-rs/clap/issues/2924)
-* **unstable-v4**: Preview features which will be stable on the v4.0 release
+For more details, see:
+- [docs.rs](https://docs.rs/clap/latest/clap/)
+- [examples](examples/)
## Sponsors
diff --git a/vendor/clap/examples/README.md b/vendor/clap/examples/README.md
deleted file mode 100644
index 2034ab80e..000000000
--- a/vendor/clap/examples/README.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# Examples
-
-- Basic demo: [derive](demo.md)
-- Typed arguments: [derive](typed-derive.md)
- - Topics:
- - Custom `parse()`
-- Custom cargo command: [builder](cargo-example.md), [derive](cargo-example-derive.md)
- - Topics:
- - Subcommands
- - Cargo plugins
-- git-like interface: [builder](git.md), [derive](git-derive.md)
- - Topics:
- - Subcommands
- - External subcommands
- - Optional subcommands
- - Default subcommands
-- pacman-like interface: [builder](pacman.md)
- - Topics:
- - Flag subcommands
- - Conflicting arguments
-- Escaped positionals with `--`: [builder](escaped-positional.md), [derive](escaped-positional-derive.md)
-- Multi-call
- - busybox: [builder](multicall-busybox.md)
- - Topics:
- - Subcommands
- - hostname: [builder](multicall-hostname.md)
- - Topics:
- - Subcommands
-- repl: [builder](repl.rs)
- - Topics:
- - Read-Eval-Print Loops / Custom command lines
-
-## Contributing
-
-New examples:
-- Building: They must be added to [Cargo.toml](../Cargo.toml) with the appropriate `required-features`.
-- Testing: Ensure there is a markdown file with [trycmd](https://docs.rs/trycmd) syntax
-- Link the `.md` file from here
-
-See also the general [CONTRIBUTING](../CONTRIBUTING.md).
diff --git a/vendor/clap/examples/cargo-example-derive.md b/vendor/clap/examples/cargo-example-derive.md
index 994c6d4d8..2c7a11b88 100644
--- a/vendor/clap/examples/cargo-example-derive.md
+++ b/vendor/clap/examples/cargo-example-derive.md
@@ -1,5 +1,3 @@
-*Jump to [source](cargo-example-derive.rs)*
-
For more on creating a custom subcommand, see [the cargo
book](https://doc.rust-lang.org/cargo/reference/external-tools.html#custom-subcommands).
The crate [`clap-cargo`](https://github.com/crate-ci/clap-cargo) can help in
diff --git a/vendor/clap/examples/cargo-example-derive.rs b/vendor/clap/examples/cargo-example-derive.rs
index 6667a4a7d..f0aad29c7 100644
--- a/vendor/clap/examples/cargo-example-derive.rs
+++ b/vendor/clap/examples/cargo-example-derive.rs
@@ -1,8 +1,6 @@
-// Note: this requires the `derive` feature
-
use clap::Parser;
-#[derive(Parser)]
+#[derive(Parser)] // requires `derive` feature
#[clap(name = "cargo")]
#[clap(bin_name = "cargo")]
enum Cargo {
diff --git a/vendor/clap/examples/cargo-example.md b/vendor/clap/examples/cargo-example.md
index 9279cc492..6fb6a3c4d 100644
--- a/vendor/clap/examples/cargo-example.md
+++ b/vendor/clap/examples/cargo-example.md
@@ -1,5 +1,3 @@
-*Jump to [source](cargo-example.rs)*
-
For more on creating a custom subcommand, see [the cargo
book](https://doc.rust-lang.org/cargo/reference/external-tools.html#custom-subcommands).
The crate [`clap-cargo`](https://github.com/crate-ci/clap-cargo) can help in
diff --git a/vendor/clap/examples/cargo-example.rs b/vendor/clap/examples/cargo-example.rs
index 45ae67c81..d9a909f4f 100644
--- a/vendor/clap/examples/cargo-example.rs
+++ b/vendor/clap/examples/cargo-example.rs
@@ -1,5 +1,3 @@
-// Note: this requires the `cargo` feature
-
fn main() {
let cmd = clap::Command::new("cargo")
.bin_name("cargo")
diff --git a/vendor/clap/examples/demo.md b/vendor/clap/examples/demo.md
index 9b0e7e260..93ee49c37 100644
--- a/vendor/clap/examples/demo.md
+++ b/vendor/clap/examples/demo.md
@@ -1,8 +1,3 @@
-*Jump to [source](demo.rs)*
-
-**This requires enabling the `derive` feature flag.**
-
-Used to validate README.md's content
```console
$ demo --help
clap [..]
@@ -17,4 +12,8 @@ OPTIONS:
-n, --name <NAME> Name of the person to greet
-V, --version Print version information
+$ demo --name Me
+Hello Me!
+
```
+*(version number and `.exe` extension on windows replaced by placeholders)*
diff --git a/vendor/clap/examples/demo.rs b/vendor/clap/examples/demo.rs
index 957489724..a7cecfb0c 100644
--- a/vendor/clap/examples/demo.rs
+++ b/vendor/clap/examples/demo.rs
@@ -1,5 +1,3 @@
-// Note: this requires the `derive` feature
-
use clap::Parser;
/// Simple program to greet a person
diff --git a/vendor/clap/examples/derive_ref/README.md b/vendor/clap/examples/derive_ref/README.md
deleted file mode 100644
index a3b0c084d..000000000
--- a/vendor/clap/examples/derive_ref/README.md
+++ /dev/null
@@ -1,440 +0,0 @@
-# Derive Reference
-
-1. [Overview](#overview)
-2. [Attributes](#attributes)
- 1. [Terminology](#terminology)
- 2. [Command Attributes](#command-attributes)
- 3. [Arg Attributes](#arg-attributes)
- 4. [Arg Enum Attributes](#arg-enum-attributes)
- 5. [Possible Value Attributes](#possible-value-attributes)
-3. [Arg Types](#arg-types)
-4. [Doc Comments](#doc-comments)
-5. [Tips](#tips)
-6. [Mixing Builder and Derive APIS](#mixing-builder-and-derive-apis)
-
-## Overview
-
-To derive `clap` types, you need to enable the `derive` feature flag.
-
-See [demo.rs](../demo.rs) and [demo.md](../demo.md) for a brief example.
-
-Let's start by breaking down the anatomy of the derive attributes:
-```rust
-use clap::{Parser, Args, Subcommand, ValueEnum};
-
-/// Doc comment
-#[derive(Parser)]
-#[clap(APP ATTRIBUTE)]
-struct Cli {
- /// Doc comment
- #[clap(ARG ATTRIBUTE)]
- field: UserType,
-
- #[clap(value_enum, ARG ATTRIBUTE...)]
- field: EnumValues,
-
- #[clap(flatten)]
- delegate: Struct,
-
- #[clap(subcommand)]
- command: Command,
-}
-
-/// Doc comment
-#[derive(Args)]
-#[clap(PARENT APP ATTRIBUTE)]
-struct Struct {
- /// Doc comment
- #[clap(ARG ATTRIBUTE)]
- field: UserType,
-}
-
-/// Doc comment
-#[derive(Subcommand)]
-#[clap(PARENT APP ATTRIBUTE)]
-enum Command {
- /// Doc comment
- #[clap(APP ATTRIBUTE)]
- Variant1(Struct),
-
- /// Doc comment
- #[clap(APP ATTRIBUTE)]
- Variant2 {
- /// Doc comment
- #[clap(ARG ATTRIBUTE)]
- field: UserType,
- }
-}
-
-/// Doc comment
-#[derive(ValueEnum)]
-#[clap(ARG ENUM ATTRIBUTE)]
-enum EnumValues {
- /// Doc comment
- #[clap(POSSIBLE VALUE ATTRIBUTE)]
- Variant1,
-}
-
-fn main() {
- let cli = Cli::parse();
-}
-```
-
-- `Parser` parses arguments into a `struct` (arguments) or `enum` (subcommands).
-- `Args` allows defining a set of re-usable arguments that get merged into their parent container.
-- `Subcommand` defines available subcommands.
- - Subcommand arguments can be defined in a struct-variant or automatically flattened with a tuple-variant.
-- `ValueEnum` allows parsing a value directly into an `enum`, erroring on unsupported values.
- - The derive doesn't work on enums that contain non-unit variants, unless they are skipped
-
-See also the [tutorial](../tutorial_derive/README.md) and [examples](../README.md).
-
-## Attributes
-
-### Terminology
-
-**Raw attributes** are forwarded directly to the underlying `clap` builder. Any
-`Command`, `Arg`, or `PossibleValue` method can be used as an attribute.
-
-Raw attributes come in two different syntaxes:
-```rust
-#[clap(
- global = true, // name = arg form, neat for one-arg methods
- required_if_eq("out", "file") // name(arg1, arg2, ...) form.
-)]
-```
-
-- `method = arg` can only be used for methods which take only one argument.
-- `method(arg1, arg2)` can be used with any method.
-
-As long as `method_name` is not one of the magical methods - it will be
-translated into a mere method call.
-
-**Magic attributes** have post-processing done to them, whether that is
-- Providing of defaults
-- Special behavior is triggered off of it
-
-Magic attributes are more constrained in the syntax they support, usually just
-`<attr> = <value>` though some use `<attr>(<value>)` instead. See the specific
-magic attributes documentation for details. This allows users to access the
-raw behavior of an attribute via `<attr>(<value>)` syntax.
-
-**NOTE:** Some attributes are inferred from [Arg Types](#arg-types) and [Doc
-Comments](#doc-comments). Explicit attributes take precedence over inferred
-attributes.
-
-### Command Attributes
-
-These correspond to a `clap::Command` which is used for both top-level parsers and
-when defining subcommands.
-
-**Raw attributes:** Any [`Command` method](https://docs.rs/clap/latest/clap/type.Command.html) can also be used as an attribute, see [Terminology](#terminology) for syntax.
-- e.g. `#[clap(arg_required_else_help(true))]` would translate to `cmd.arg_required_else_help(true)`
-
-**Magic attributes:**
-- `name = <expr>`: `clap::Command::name`
- - When not present: [crate `name`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-name-field) (`Parser` container), variant name (`Subcommand` variant)
-- `version [= <expr>]`: `clap::Command::version`
- - When not present: no version set
- - Without `<expr>`: defaults to [crate `version`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field)
-- `author [= <expr>]`: `clap::Command::author`
- - When not present: no author set
- - Without `<expr>`: defaults to [crate `authors`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field)
-- `about [= <expr>]`: `clap::Command::about`
- - When not present: [Doc comment summary](#doc-comments)
- - Without `<expr>`: [crate `description`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-description-field) (`Parser` container)
- - **TIP:** When a doc comment is also present, you most likely want to add
- `#[clap(long_about = None)]` to clear the doc comment so only `about`
- gets shown with both `-h` and `--help`.
-- `long_about = <expr>`: `clap::Command::long_about`
- - When not present: [Doc comment](#doc-comments) if there is a blank line, else nothing
-- `verbatim_doc_comment`: Minimizes pre-processing when converting doc comments to `about` / `long_about`
-- `next_display_order`: `clap::Command::next_display_order`
-- `next_help_heading`: `clap::Command::next_help_heading`
- - When `flatten`ing `Args`, this is scoped to just the args in this struct and any struct `flatten`ed into it
-- `rename_all = <expr>`: Override default field / variant name case conversion for `Command::name` / `Arg::name`
- - When not present: `kebab-case`
- - Available values: `camelCase`, `kebab-case`, `PascalCase`, `SCREAMING_SNAKE_CASE`, `snake_case`, `lower`, `UPPER`, `verbatim`
-- `rename_all_env = <expr>`: Override default field name case conversion for env variables for `clap::Arg::env`
- - When not present: `SCREAMING_SNAKE_CASE`
- - Available values: `camelCase`, `kebab-case`, `PascalCase`, `SCREAMING_SNAKE_CASE`, `snake_case`, `lower`, `UPPER`, `verbatim`
-
-And for `Subcommand` variants:
-- `skip`: Ignore this variant
-- `flatten`: Delegates to the variant for more subcommands (must implement `Subcommand`)
-- `subcommand`: Nest subcommands under the current set of subcommands (must implement `Subcommand`)
-- `external_subcommand`: `clap::Command::allow_external_subcommand(true)`
- - Variant must be either `Variant(Vec<String>)` or `Variant(Vec<OsString>)`
-
-### Arg Attributes
-
-These correspond to a `clap::Arg`.
-
-**Raw attributes:** Any [`Arg` method](https://docs.rs/clap/latest/clap/struct.Arg.html) can also be used as an attribute, see [Terminology](#terminology) for syntax.
-- e.g. `#[clap(max_values(3))]` would translate to `arg.max_values(3)`
-
-**Magic attributes**:
-- `name = <expr>`: `clap::Arg::new`
- - When not present: case-converted field name is used
-- `value_parser [= <expr>]`: `clap::Arg::value_parser`
- - When not present: will auto-select an implementation based on the field type
- - To register a custom type's `ValueParser`, implement `ValueParserFactory`
- - When present, implies `#[clap(action)]`
-- `action [= <expr>]`: `clap::Arg::action`
- - When not present: will auto-select an action based on the field type
- - When present, implies `#[clap(value_parser)]`
-- `help = <expr>`: `clap::Arg::help`
- - When not present: [Doc comment summary](#doc-comments)
-- `long_help = <expr>`: `clap::Arg::long_help`
- - When not present: [Doc comment](#doc-comments) if there is a blank line, else nothing
-- `verbatim_doc_comment`: Minimizes pre-processing when converting doc comments to `help` / `long_help`
-- `short [= <char>]`: `clap::Arg::short`
- - When not present: no short set
- - Without `<char>`: defaults to first character in the case-converted field name
-- `long [= <str>]`: `clap::Arg::long`
- - When not present: no long set
- - Without `<str>`: defaults to the case-converted field name
-- `env [= <str>]`: `clap::Arg::env` (needs `env` feature enabled)
- - When not present: no env set
- - Without `<str>`: defaults to the case-converted field name
-- `flatten`: Delegates to the field for more arguments (must implement `Args`)
- - Only `help_heading` can be used with `flatten`. See
- [clap-rs/clap#3269](https://github.com/clap-rs/clap/issues/3269) for why
- arg attributes are not generally supported.
- - **Tip:** Though we do apply a flattened `Args`'s Parent Command Attributes, this
- makes reuse harder. Generally prefer putting the cmd attributes on the `Parser`
- or on the flattened field.
-- `subcommand`: Delegates definition of subcommands to the field (must implement `Subcommand`)
- - When `Option<T>`, the subcommand becomes optional
-- `from_global`: Read a `clap::Arg::global` argument (raw attribute), regardless of what subcommand you are in
-- `parse(<kind> [= <function>])`: `clap::Arg::validator` and `clap::ArgMatches::values_of_t`
- - **Deprecated:**
- - Use `value_parser(...)` for `from_str`, `try_from_str`, `from_os_str`, and `try_from_os_str`
- - Use `action(ArgAction::Count` for `from_occurrences`
- - Use `action(ArgAction::SetTrue` for `from_flag`
- - Default: `try_from_str`
- - Warning: for `Path` / `OsString`, be sure to use `try_from_os_str`
- - See [Arg Types](#arg-types) for more details
-- `value_enum`: Parse the value using the `ValueEnum` trait
-- `skip [= <expr>]`: Ignore this field, filling in with `<expr>`
- - Without `<expr>`: fills the field with `Default::default()`
-- `default_value = <str>`: `clap::Arg::default_value` and `clap::Arg::required(false)`
-- `default_value_t [= <expr>]`: `clap::Arg::default_value` and `clap::Arg::required(false)`
- - Requires `std::fmt::Display` or `#[clap(value_enum)]`
- - Without `<expr>`, relies on `Default::default()`
-- `default_value_os_t [= <expr>]`: `clap::Arg::default_value_os` and `clap::Arg::required(false)`
- - Requires `std::convert::Into<OsString>` or `#[clap(value_enum)]`
- - Without `<expr>`, relies on `Default::default()`
-
-### Arg Enum Attributes
-
-- `rename_all = <expr>`: Override default field / variant name case conversion for `PossibleValue::new`
- - When not present: `kebab-case`
- - Available values: `camelCase`, `kebab-case`, `PascalCase`, `SCREAMING_SNAKE_CASE`, `snake_case`, `lower`, `UPPER`, `verbatim`
-
-### Possible Value Attributes
-
-These correspond to a `clap::PossibleValue`.
-
-**Raw attributes:** Any [`PossibleValue` method](https://docs.rs/clap/latest/clap/struct.PossibleValue.html) can also be used as an attribute, see [Terminology](#terminology) for syntax.
-- e.g. `#[clap(alias("foo"))]` would translate to `pv.alias("foo")`
-
-**Magic attributes**:
-- `name = <expr>`: `clap::PossibleValue::new`
- - When not present: case-converted field name is used
-- `help = <expr>`: `clap::PossibleValue::help`
- - When not present: [Doc comment summary](#doc-comments)
-
-## Arg Types
-
-`clap` assumes some intent based on the type used:
-
-| Type | Effect | Implies |
-|---------------------|--------------------------------------|------------------------------------------------------------------|
-| `bool` | flag | `#[clap(parse(from_flag))]` |
-| `Option<T>` | optional argument | `.takes_value(true).required(false)` |
-| `Option<Option<T>>` | optional value for optional argument | `.takes_value(true).required(false).min_values(0).max_values(1)` |
-| `T` | required argument | `.takes_value(true).required(!has_default)` |
-| `Vec<T>` | `0..` occurrences of argument | `.takes_value(true).required(false).multiple_occurrences(true)` |
-| `Option<Vec<T>>` | `0..` occurrences of argument | `.takes_value(true).required(false).multiple_occurrences(true)` |
-
-Notes:
-- For custom type behavior, you can override the implied attributes/settings and/or set additional ones
- - For example, see [custom-bool](./custom-bool.md)
-- `Option<Vec<T>>` will be `None` instead of `vec![]` if no arguments are provided.
- - This gives the user some flexibility in designing their argument, like with `min_values(0)`
-
-You can then support your custom type with `#[clap(parse(<kind> [= <function>]))]`:
-
-| `<kind>` | Signature | Default `<function>` |
-|--------------------------|---------------------------------------|---------------------------------|
-| `from_str` | `fn(&str) -> T` | `::std::convert::From::from` |
-| `try_from_str` (default) | `fn(&str) -> Result<T, E>` | `::std::str::FromStr::from_str` |
-| `from_os_str` | `fn(&OsStr) -> T` | `::std::convert::From::from` |
-| `try_from_os_str` | `fn(&OsStr) -> Result<T, E>` | (no default function) |
-| `from_occurrences` | `fn(u64) -> T` | `value as T` |
-| `from_flag` | `fn(bool) -> T` | `::std::convert::From::from` |
-
-Notes:
-- `from_os_str`:
- - Implies `arg.takes_value(true).allow_invalid_utf8(true)`
-- `try_from_os_str`:
- - Implies `arg.takes_value(true).allow_invalid_utf8(true)`
-- `from_occurrences`:
- - Implies `arg.takes_value(false).multiple_occurrences(true)`
- - Reads from `clap::ArgMatches::occurrences_of` rather than a `get_one` function
- - Note: operations on values, like `default_value`, are unlikely to do what you want
-- `from_flag`
- - Implies `arg.takes_value(false)`
- - Reads from `clap::ArgMatches::is_present` rather than a `get_one` function
- - Note: operations on values, like `default_value`, are unlikely to do what you want
-
-**Warning:**
-- To support non-UTF8 paths, you should use `#[clap(value_parser)]` otherwise
- `clap` will parse it as a `String` which will fail on some paths.
-
-## Doc Comments
-
-In clap, help messages for the whole binary can be specified
-via [`Command::about`] and [`Command::long_about`] while help messages
-for individual arguments can be specified via [`Arg::help`] and [`Arg::long_help`]".
-
-`long_*` variants are used when user calls the program with
-`--help` and "short" variants are used with `-h` flag.
-
-```rust
-# use clap::Parser;
-
-#[derive(Parser)]
-#[clap(about = "I am a program and I work, just pass `-h`", long_about = None)]
-struct Foo {
- #[clap(short, help = "Pass `-h` and you'll see me!")]
- bar: String,
-}
-```
-
-For convenience, doc comments can be used instead of raw methods
-(this example works exactly like the one above):
-
-```rust
-# use clap::Parser;
-
-#[derive(Parser)]
-/// I am a program and I work, just pass `-h`
-struct Foo {
- /// Pass `-h` and you'll see me!
- bar: String,
-}
-```
-
-**NOTE:** Attributes have priority over doc comments!
-
-**Top level doc comments always generate `Command::about/long_about` calls!**
-If you really want to use the `Command::about/long_about` methods (you likely don't),
-use the `about` / `long_about` attributes to override the calls generated from
-the doc comment. To clear `long_about`, you can use
-`#[clap(long_about = None)]`.
-
-**TIP:** Set `#![deny(missing_docs)]` to catch missing `--help` documentation at compile time.
-
-### Pre-processing
-
-```rust
-# use clap::Parser;
-#[derive(Parser)]
-/// Hi there, I'm Robo!
-///
-/// I like beeping, stumbling, eating your electricity,
-/// and making records of you singing in a shower.
-/// Pay up, or I'll upload it to youtube!
-struct Robo {
- /// Call my brother SkyNet.
- ///
- /// I am artificial superintelligence. I won't rest
- /// until I'll have destroyed humanity. Enjoy your
- /// pathetic existence, you mere mortals.
- #[clap(long, action)]
- kill_all_humans: bool,
-}
-```
-
-A doc comment consists of three parts:
-- Short summary
-- A blank line (whitespace only)
-- Detailed description, all the rest
-
-The summary corresponds with `Command::about` / `Arg::help`. When a blank line is
-present, the whole doc comment will be passed to `Command::long_about` /
-`Arg::long_help`. Or in other words, a doc may result in just a `Command::about` /
-`Arg::help` or `Command::about` / `Arg::help` and `Command::long_about` /
-`Arg::long_help`
-
-In addition, when `verbatim_doc_comment` is not present, `clap` applies some preprocessing, including:
-
-- Strip leading and trailing whitespace from every line, if present.
-
-- Strip leading and trailing blank lines, if present.
-
-- Interpret each group of non-empty lines as a word-wrapped paragraph.
-
- We replace newlines within paragraphs with spaces to allow the output
- to be re-wrapped to the terminal width.
-
-- Strip any excess blank lines so that there is exactly one per paragraph break.
-
-- If the first paragraph ends in exactly one period,
- remove the trailing period (i.e. strip trailing periods but not trailing ellipses).
-
-Sometimes you don't want this preprocessing to apply, for example the comment contains
-some ASCII art or markdown tables, you would need to preserve LFs along with
-blank lines and the leading/trailing whitespace. When you pass use the
-`verbatim_doc_comment` magic attribute, you preserve
-them.
-
-**Note:** Keep in mind that `verbatim_doc_comment` will *still*
-- Remove one leading space from each line, even if this attribute is present,
- to allow for a space between `///` and the content.
-- Remove leading and trailing blank lines
-
-## Tips
-
-- To get access to a `Command` call `CommandFactory::command` (implemented when deriving `Parser`)
-- Proactively check for bad `Command` configurations by calling `Command::debug_assert` in a test ([example](../tutorial_derive/05_01_assert.rs))
-
-## Mixing Builder and Derive APIs
-
-The builder and derive APIs do not live in isolation. They can work together, which is especially helpful if some arguments can be specified at compile-time while others must be specified at runtime.
-
-### Using derived arguments in a builder application
-
-*[Jump to source](augment_args.rs)*
-
-When using the derive API, you can `#[clap(flatten)]` a struct deriving `Args` into a struct deriving `Args` or `Parser`. This example shows how you can augment a `Command` instance created using the builder API with `Args` created using the derive API.
-
-It uses the `Args::augment_args` method to add the arguments to the `Command` instance.
-
-Crates such as [clap-verbosity-flag](https://github.com/rust-cli/clap-verbosity-flag) provide structs that implement `Args` or `Parser`. Without the technique shown in this example, it would not be possible to use such crates with the builder API. `augment_args` to the rescue!
-
-### Using derived subcommands in a builder application
-
-*[Jump to source](augment_subcommands.rs)*
-
-When using the derive API, you can use `#[clap(subcommand)]` inside the struct to add subcommands. The type of the field is usually an enum that derived `Parser`. However, you can also add the subcommands in that enum to a `Command` instance created with the builder API.
-
-It uses the `Subcommand::augment_subcommands` method to add the subcommands to the `Command` instance.
-
-### Adding hand-implemented subcommands to a derived application
-
-*[Jump to source](hand_subcommand.rs)*
-
-When using the derive API, you can use `#[clap(subcommand)]` inside the struct to add subcommands. The type of the field is usually an enum that derived `Parser`. However, you can also implement the `Subcommand` trait manually on this enum (or any other type) and it can still be used inside the struct created with the derive API. The implementation of the `Subcommand` trait will use the builder API to add the subcommands to the `Command` instance created behind the scenes for you by the derive API.
-
-Notice how in the previous example we used `augment_subcommands` on an enum that derived `Parser`, whereas now we implement `augment_subcommands` ourselves, but the derive API calls it automatically since we used the `#[clap(subcommand)]` attribute.
-
-### Flattening hand-implemented args into a derived application
-
-*[Jump to source](flatten_hand_args.rs)*
-
-When using the derive API, you can use `#[clap(flatten)]` inside the struct to add arguments as if they were added directly to the containing struct. The type of the field is usually an struct that derived `Args`. However, you can also implement the `Args` trait manually on this struct (or any other type) and it can still be used inside the struct created with the derive API. The implementation of the `Args` trait will use the builder API to add the arguments to the `Command` instance created behind the scenes for you by the derive API.
-
-Notice how in the example 1 we used `augment_args` on the struct that derived `Parser`, whereas now we implement `augment_args` ourselves, but the derive API calls it automatically since we used the `#[clap(flatten)]` attribute.
diff --git a/vendor/clap/examples/derive_ref/augment_args.rs b/vendor/clap/examples/derive_ref/augment_args.rs
index 390c72f4a..310556914 100644
--- a/vendor/clap/examples/derive_ref/augment_args.rs
+++ b/vendor/clap/examples/derive_ref/augment_args.rs
@@ -1,6 +1,6 @@
-use clap::{arg, Args as _, Command, FromArgMatches as _, Parser};
+use clap::{arg, Args, Command, FromArgMatches as _};
-#[derive(Parser, Debug)]
+#[derive(Args, Debug)]
struct DerivedArgs {
#[clap(short, long, action)]
derived: bool,
@@ -12,13 +12,10 @@ fn main() {
let cli = DerivedArgs::augment_args(cli);
let matches = cli.get_matches();
- println!(
- "Value of built: {:?}",
- *matches.get_one::<bool>("built").unwrap()
- );
+ println!("Value of built: {:?}", matches.get_flag("built"));
println!(
"Value of derived via ArgMatches: {:?}",
- *matches.get_one::<bool>("derived").unwrap()
+ matches.get_flag("derived")
);
// Since DerivedArgs implements FromArgMatches, we can extract it from the unstructured ArgMatches.
diff --git a/vendor/clap/examples/derive_ref/flatten_hand_args.rs b/vendor/clap/examples/derive_ref/flatten_hand_args.rs
index 74d10edec..c10e0b29f 100644
--- a/vendor/clap/examples/derive_ref/flatten_hand_args.rs
+++ b/vendor/clap/examples/derive_ref/flatten_hand_args.rs
@@ -15,8 +15,8 @@ impl FromArgMatches for CliArgs {
}
fn from_arg_matches_mut(matches: &mut ArgMatches) -> Result<Self, Error> {
Ok(Self {
- foo: *matches.get_one::<bool>("foo").expect("defaulted by clap"),
- bar: *matches.get_one::<bool>("bar").expect("defaulted by clap"),
+ foo: matches.get_flag("foo"),
+ bar: matches.get_flag("bar"),
quuz: matches.remove_one::<String>("quuz"),
})
}
@@ -25,8 +25,8 @@ impl FromArgMatches for CliArgs {
self.update_from_arg_matches_mut(&mut matches)
}
fn update_from_arg_matches_mut(&mut self, matches: &mut ArgMatches) -> Result<(), Error> {
- self.foo |= *matches.get_one::<bool>("foo").expect("defaulted by clap");
- self.bar |= *matches.get_one::<bool>("bar").expect("defaulted by clap");
+ self.foo |= matches.get_flag("foo");
+ self.bar |= matches.get_flag("bar");
if let Some(quuz) = matches.remove_one::<String>("quuz") {
self.quuz = Some(quuz);
}
diff --git a/vendor/clap/examples/escaped-positional-derive.md b/vendor/clap/examples/escaped-positional-derive.md
index 3b5f8fe56..fa39a2c03 100644
--- a/vendor/clap/examples/escaped-positional-derive.md
+++ b/vendor/clap/examples/escaped-positional-derive.md
@@ -1,6 +1,4 @@
-*Jump to [source](escaped-positional-derive.rs)*
-
-**This requires enabling the `derive` feature flag.**
+**This requires enabling the [`derive` feature flag][crate::_features].**
You can use `--` to escape further arguments.
diff --git a/vendor/clap/examples/escaped-positional-derive.rs b/vendor/clap/examples/escaped-positional-derive.rs
index 54dbc853b..fd8fde4ed 100644
--- a/vendor/clap/examples/escaped-positional-derive.rs
+++ b/vendor/clap/examples/escaped-positional-derive.rs
@@ -1,8 +1,6 @@
-// Note: this requires the `derive` feature
-
use clap::Parser;
-#[derive(Parser)]
+#[derive(Parser)] // requires `derive` feature
#[clap(author, version, about, long_about = None)]
struct Cli {
#[clap(short = 'f', action)]
diff --git a/vendor/clap/examples/escaped-positional.md b/vendor/clap/examples/escaped-positional.md
index 1f71a8736..987b26139 100644
--- a/vendor/clap/examples/escaped-positional.md
+++ b/vendor/clap/examples/escaped-positional.md
@@ -1,6 +1,4 @@
-*Jump to [source](escaped-positional.rs)*
-
-**This requires enabling the `cargo` feature flag.**
+**This requires enabling the [`cargo` feature flag][crate::_features].**
You can use `--` to escape further arguments.
diff --git a/vendor/clap/examples/escaped-positional.rs b/vendor/clap/examples/escaped-positional.rs
index a0fff790b..fdcb930fb 100644
--- a/vendor/clap/examples/escaped-positional.rs
+++ b/vendor/clap/examples/escaped-positional.rs
@@ -1,9 +1,7 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command, value_parser, ArgAction};
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.arg(arg!(eff: -f).action(ArgAction::SetTrue))
.arg(
arg!(pea: -p <PEAR>)
@@ -22,10 +20,7 @@ fn main() {
// This is what will happen with `myprog -f -p=bob -- sloppy slop slop`...
// -f used: true
- println!(
- "-f used: {:?}",
- *matches.get_one::<bool>("eff").expect("defaulted by clap")
- );
+ println!("-f used: {:?}", matches.get_flag("eff"));
// -p's value: Some("bob")
println!("-p's value: {:?}", matches.get_one::<String>("pea"));
// 'slops' values: Some(["sloppy", "slop", "slop"])
diff --git a/vendor/clap/examples/git-derive.md b/vendor/clap/examples/git-derive.md
index dc27776f5..aa1ca6d9d 100644
--- a/vendor/clap/examples/git-derive.md
+++ b/vendor/clap/examples/git-derive.md
@@ -1,6 +1,4 @@
-*Jump to [source](git-derive.rs)*
-
-**This requires enabling the `derive` feature flag.**
+**This requires enabling the [`derive` feature flag][crate::_features].**
Git is an example of several common subcommand patterns.
diff --git a/vendor/clap/examples/git-derive.rs b/vendor/clap/examples/git-derive.rs
index ecbda3fe9..ac500ddad 100644
--- a/vendor/clap/examples/git-derive.rs
+++ b/vendor/clap/examples/git-derive.rs
@@ -1,12 +1,10 @@
-// Note: this requires the `derive` feature
-
use std::ffi::OsString;
use std::path::PathBuf;
use clap::{Args, Parser, Subcommand};
/// A fictional versioning CLI
-#[derive(Debug, Parser)]
+#[derive(Debug, Parser)] // requires `derive` feature
#[clap(name = "git")]
#[clap(about = "A fictional versioning CLI", long_about = None)]
struct Cli {
diff --git a/vendor/clap/examples/git.md b/vendor/clap/examples/git.md
index 2cdfe653b..9e413415a 100644
--- a/vendor/clap/examples/git.md
+++ b/vendor/clap/examples/git.md
@@ -1,5 +1,3 @@
-*Jump to [source](git.rs)*
-
Git is an example of several common subcommand patterns.
Help:
diff --git a/vendor/clap/examples/git.rs b/vendor/clap/examples/git.rs
index 5536f1487..e56f427a6 100644
--- a/vendor/clap/examples/git.rs
+++ b/vendor/clap/examples/git.rs
@@ -1,5 +1,3 @@
-// Note: this requires the `cargo` feature
-
use std::ffi::OsString;
use std::path::PathBuf;
diff --git a/vendor/clap/examples/multicall-busybox.md b/vendor/clap/examples/multicall-busybox.md
index a09418403..5ca2cad5b 100644
--- a/vendor/clap/examples/multicall-busybox.md
+++ b/vendor/clap/examples/multicall-busybox.md
@@ -1,8 +1,4 @@
-*Jump to [source](multicall-busybox.rs)*
-
-Example of a busybox-style multicall program
-
-See the documentation for `clap::Command::multicall` for rationale.
+See the documentation for [`Command::multicall`][crate::App::multicall] for rationale.
This example omits every command except true and false,
which are the most trivial to implement,
diff --git a/vendor/clap/examples/multicall-hostname.md b/vendor/clap/examples/multicall-hostname.md
index 9e17ca16c..d22b85fba 100644
--- a/vendor/clap/examples/multicall-hostname.md
+++ b/vendor/clap/examples/multicall-hostname.md
@@ -1,8 +1,4 @@
-*Jump to [source](multicall-hostname.rs)*
-
-Example of a `hostname-style` multicall program
-
-See the documentation for `clap::Command::multicall` for rationale.
+See the documentation for [`Command::multicall`][crate::App::multicall] for rationale.
This example omits the implementation of displaying address config
diff --git a/vendor/clap/examples/pacman.md b/vendor/clap/examples/pacman.md
index 7f6c5a7d3..b8ddd09d9 100644
--- a/vendor/clap/examples/pacman.md
+++ b/vendor/clap/examples/pacman.md
@@ -1,5 +1,3 @@
-*Jump to [source](pacman.rs)*
-
[`pacman`](https://wiki.archlinux.org/index.php/pacman) defines subcommands via flags.
Here, `-S` is a short flag subcommand:
diff --git a/vendor/clap/examples/pacman.rs b/vendor/clap/examples/pacman.rs
index 6a60a8bf5..aee7cd892 100644
--- a/vendor/clap/examples/pacman.rs
+++ b/vendor/clap/examples/pacman.rs
@@ -89,10 +89,7 @@ fn main() {
.collect();
let values = packages.join(", ");
- if *sync_matches
- .get_one::<bool>("info")
- .expect("defaulted by clap")
- {
+ if sync_matches.get_flag("info") {
println!("Retrieving info for {}...", values);
} else {
println!("Installing {}...", values);
diff --git a/vendor/clap/examples/tutorial_builder/01_quick.md b/vendor/clap/examples/tutorial_builder/01_quick.md
new file mode 100644
index 000000000..4a9e3fca1
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/01_quick.md
@@ -0,0 +1,37 @@
+```console
+$ 01_quick --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 01_quick[EXE] [OPTIONS] [name] [SUBCOMMAND]
+
+ARGS:
+ <name> Optional name to operate on
+
+OPTIONS:
+ -c, --config <FILE> Sets a custom config file
+ -d, --debug Turn debugging information on
+ -h, --help Print help information
+ -V, --version Print version information
+
+SUBCOMMANDS:
+ help Print this message or the help of the given subcommand(s)
+ test does testing things
+
+```
+
+By default, the program does nothing:
+```console
+$ 01_quick
+Debug mode is off
+
+```
+
+But you can mix and match the various features
+```console
+$ 01_quick -dd test
+Debug mode is on
+Not printing testing lists...
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/01_quick.rs b/vendor/clap/examples/tutorial_builder/01_quick.rs
index 61cc3432d..393d6aeae 100644
--- a/vendor/clap/examples/tutorial_builder/01_quick.rs
+++ b/vendor/clap/examples/tutorial_builder/01_quick.rs
@@ -1,11 +1,9 @@
-// Note: this requires the `cargo` feature
-
use std::path::PathBuf;
use clap::{arg, command, value_parser, ArgAction, Command};
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.arg(arg!([name] "Optional name to operate on"))
.arg(
arg!(
diff --git a/vendor/clap/examples/tutorial_builder/02_app_settings.md b/vendor/clap/examples/tutorial_builder/02_app_settings.md
new file mode 100644
index 000000000..247843bcf
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/02_app_settings.md
@@ -0,0 +1,19 @@
+```console
+$ 02_app_settings --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 02_app_settings[EXE] --two <VALUE> --one <VALUE>
+
+OPTIONS:
+ --two <VALUE>
+ --one <VALUE>
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 02_app_settings --one -1 --one -3 --two 10
+two: "10"
+one: "-3"
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/02_app_settings.rs b/vendor/clap/examples/tutorial_builder/02_app_settings.rs
index 7bbedd3eb..5f374d7f0 100644
--- a/vendor/clap/examples/tutorial_builder/02_app_settings.rs
+++ b/vendor/clap/examples/tutorial_builder/02_app_settings.rs
@@ -1,9 +1,7 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command, AppSettings, ArgAction};
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.global_setting(AppSettings::DeriveDisplayOrder)
.allow_negative_numbers(true)
.arg(arg!(--two <VALUE>).action(ArgAction::Set))
diff --git a/vendor/clap/examples/tutorial_builder/02_apps.md b/vendor/clap/examples/tutorial_builder/02_apps.md
new file mode 100644
index 000000000..8504b5f52
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/02_apps.md
@@ -0,0 +1,19 @@
+```console
+$ 02_apps --help
+MyApp 1.0
+Kevin K. <kbknapp@gmail.com>
+Does awesome things
+
+USAGE:
+ 02_apps[EXE] --two <VALUE> --one <VALUE>
+
+OPTIONS:
+ -h, --help Print help information
+ --one <VALUE>
+ --two <VALUE>
+ -V, --version Print version information
+
+$ 02_apps --version
+MyApp 1.0
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/02_crate.md b/vendor/clap/examples/tutorial_builder/02_crate.md
new file mode 100644
index 000000000..f76e0d608
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/02_crate.md
@@ -0,0 +1,18 @@
+```console
+$ 02_crate --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 02_crate[EXE] --two <VALUE> --one <VALUE>
+
+OPTIONS:
+ -h, --help Print help information
+ --one <VALUE>
+ --two <VALUE>
+ -V, --version Print version information
+
+$ 02_crate --version
+clap [..]
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/02_crate.rs b/vendor/clap/examples/tutorial_builder/02_crate.rs
index 16b7e7ee0..8a1722fd3 100644
--- a/vendor/clap/examples/tutorial_builder/02_crate.rs
+++ b/vendor/clap/examples/tutorial_builder/02_crate.rs
@@ -1,8 +1,7 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command};
fn main() {
+ // requires `cargo` feature, reading name, version, author, and description from `Cargo.toml`
let matches = command!()
.arg(arg!(--two <VALUE>))
.arg(arg!(--one <VALUE>))
diff --git a/vendor/clap/examples/tutorial_builder/03_01_flag_bool.md b/vendor/clap/examples/tutorial_builder/03_01_flag_bool.md
new file mode 100644
index 000000000..b0ee2a126
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/03_01_flag_bool.md
@@ -0,0 +1,23 @@
+```console
+$ 03_01_flag_bool --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_01_flag_bool[EXE] [OPTIONS]
+
+OPTIONS:
+ -h, --help Print help information
+ -v, --verbose
+ -V, --version Print version information
+
+$ 03_01_flag_bool
+verbose: false
+
+$ 03_01_flag_bool --verbose
+verbose: true
+
+$ 03_01_flag_bool --verbose --verbose
+verbose: true
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/03_01_flag_bool.rs b/vendor/clap/examples/tutorial_builder/03_01_flag_bool.rs
index 41ecbb1d7..03f2f1756 100644
--- a/vendor/clap/examples/tutorial_builder/03_01_flag_bool.rs
+++ b/vendor/clap/examples/tutorial_builder/03_01_flag_bool.rs
@@ -1,9 +1,7 @@
-// Note: this requires the `cargo` feature
-
use clap::{command, Arg, ArgAction};
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.arg(
Arg::new("verbose")
.short('v')
@@ -12,10 +10,5 @@ fn main() {
)
.get_matches();
- println!(
- "verbose: {:?}",
- *matches
- .get_one::<bool>("verbose")
- .expect("defaulted by clap")
- );
+ println!("verbose: {:?}", matches.get_flag("verbose"));
}
diff --git a/vendor/clap/examples/tutorial_builder/03_01_flag_count.md b/vendor/clap/examples/tutorial_builder/03_01_flag_count.md
new file mode 100644
index 000000000..ca4bcd6eb
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/03_01_flag_count.md
@@ -0,0 +1,23 @@
+```console
+$ 03_01_flag_count --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_01_flag_count[EXE] [OPTIONS]
+
+OPTIONS:
+ -h, --help Print help information
+ -v, --verbose
+ -V, --version Print version information
+
+$ 03_01_flag_count
+verbose: 0
+
+$ 03_01_flag_count --verbose
+verbose: 1
+
+$ 03_01_flag_count --verbose --verbose
+verbose: 2
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/03_01_flag_count.rs b/vendor/clap/examples/tutorial_builder/03_01_flag_count.rs
index 764affbd8..7f23649d6 100644
--- a/vendor/clap/examples/tutorial_builder/03_01_flag_count.rs
+++ b/vendor/clap/examples/tutorial_builder/03_01_flag_count.rs
@@ -1,16 +1,9 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command, ArgAction};
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.arg(arg!(-v - -verbose).action(ArgAction::Count))
.get_matches();
- println!(
- "verbose: {:?}",
- matches
- .get_one::<u8>("verbose")
- .expect("Count always defaulted")
- );
+ println!("verbose: {:?}", matches.get_count("verbose"));
}
diff --git a/vendor/clap/examples/tutorial_builder/03_02_option.md b/vendor/clap/examples/tutorial_builder/03_02_option.md
new file mode 100644
index 000000000..6198bcc73
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/03_02_option.md
@@ -0,0 +1,32 @@
+```console
+$ 03_02_option --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_02_option[EXE] [OPTIONS]
+
+OPTIONS:
+ -h, --help Print help information
+ -n, --name <NAME>
+ -V, --version Print version information
+
+$ 03_02_option
+name: None
+
+$ 03_02_option --name bob
+name: Some("bob")
+
+$ 03_02_option --name=bob
+name: Some("bob")
+
+$ 03_02_option -n bob
+name: Some("bob")
+
+$ 03_02_option -n=bob
+name: Some("bob")
+
+$ 03_02_option -nbob
+name: Some("bob")
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/03_02_option.rs b/vendor/clap/examples/tutorial_builder/03_02_option.rs
index 80e2b9159..188244566 100644
--- a/vendor/clap/examples/tutorial_builder/03_02_option.rs
+++ b/vendor/clap/examples/tutorial_builder/03_02_option.rs
@@ -1,9 +1,7 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command};
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.arg(arg!(-n --name <NAME>).required(false))
.get_matches();
diff --git a/vendor/clap/examples/tutorial_builder/03_03_positional.md b/vendor/clap/examples/tutorial_builder/03_03_positional.md
new file mode 100644
index 000000000..a3d7b8cf3
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/03_03_positional.md
@@ -0,0 +1,22 @@
+```console
+$ 03_03_positional --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_03_positional[EXE] [NAME]
+
+ARGS:
+ <NAME>
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 03_03_positional
+NAME: None
+
+$ 03_03_positional bob
+NAME: Some("bob")
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/03_03_positional.rs b/vendor/clap/examples/tutorial_builder/03_03_positional.rs
index c6579409a..0c3a5f037 100644
--- a/vendor/clap/examples/tutorial_builder/03_03_positional.rs
+++ b/vendor/clap/examples/tutorial_builder/03_03_positional.rs
@@ -1,9 +1,9 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command};
fn main() {
- let matches = command!().arg(arg!([NAME])).get_matches();
+ let matches = command!() // requires `cargo` feature
+ .arg(arg!([NAME]))
+ .get_matches();
println!("NAME: {:?}", matches.get_one::<String>("NAME"));
}
diff --git a/vendor/clap/examples/tutorial_builder/03_04_subcommands.md b/vendor/clap/examples/tutorial_builder/03_04_subcommands.md
new file mode 100644
index 000000000..8f9efa911
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/03_04_subcommands.md
@@ -0,0 +1,64 @@
+```console
+$ 03_04_subcommands help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_04_subcommands[EXE] <SUBCOMMAND>
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+SUBCOMMANDS:
+ add Adds files to myapp
+ help Print this message or the help of the given subcommand(s)
+
+$ 03_04_subcommands help add
+03_04_subcommands[EXE]-add [..]
+Adds files to myapp
+
+USAGE:
+ 03_04_subcommands[EXE] add [NAME]
+
+ARGS:
+ <NAME>
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 03_04_subcommands add bob
+'myapp add' was used, name is: Some("bob")
+
+```
+
+Because we set [`Command::arg_required_else_help`][crate::Command::arg_required_else_help]:
+```console
+$ 03_04_subcommands
+? failed
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_04_subcommands[EXE] <SUBCOMMAND>
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+SUBCOMMANDS:
+ add Adds files to myapp
+ help Print this message or the help of the given subcommand(s)
+
+```
+
+Because we set [`Command::propagate_version`][crate::Command::propagate_version]:
+```console
+$ 03_04_subcommands --version
+clap [..]
+
+$ 03_04_subcommands add --version
+03_04_subcommands[EXE]-add [..]
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/03_04_subcommands.rs b/vendor/clap/examples/tutorial_builder/03_04_subcommands.rs
index 1dd1cbf09..fbe23809e 100644
--- a/vendor/clap/examples/tutorial_builder/03_04_subcommands.rs
+++ b/vendor/clap/examples/tutorial_builder/03_04_subcommands.rs
@@ -1,9 +1,7 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command, Command};
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.propagate_version(true)
.subcommand_required(true)
.arg_required_else_help(true)
diff --git a/vendor/clap/examples/tutorial_builder/03_05_default_values.md b/vendor/clap/examples/tutorial_builder/03_05_default_values.md
new file mode 100644
index 000000000..7b6c0307d
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/03_05_default_values.md
@@ -0,0 +1,22 @@
+```console
+$ 03_05_default_values --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_05_default_values[EXE] [NAME]
+
+ARGS:
+ <NAME> [default: alice]
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 03_05_default_values
+NAME: "alice"
+
+$ 03_05_default_values bob
+NAME: "bob"
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/03_05_default_values.rs b/vendor/clap/examples/tutorial_builder/03_05_default_values.rs
index c68e87973..cb3e3831f 100644
--- a/vendor/clap/examples/tutorial_builder/03_05_default_values.rs
+++ b/vendor/clap/examples/tutorial_builder/03_05_default_values.rs
@@ -1,9 +1,7 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command};
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.arg(arg!([NAME]).default_value("alice"))
.get_matches();
diff --git a/vendor/clap/examples/tutorial_builder/04_01_enum.md b/vendor/clap/examples/tutorial_builder/04_01_enum.md
new file mode 100644
index 000000000..282b1e613
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/04_01_enum.md
@@ -0,0 +1,29 @@
+```console
+$ 04_01_enum --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 04_01_enum[EXE] <MODE>
+
+ARGS:
+ <MODE> What mode to run the program in [possible values: fast, slow]
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 04_01_enum fast
+Hare
+
+$ 04_01_enum slow
+Tortoise
+
+$ 04_01_enum medium
+? failed
+error: "medium" isn't a valid value for '<MODE>'
+ [possible values: fast, slow]
+
+For more information try --help
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/04_01_enum.rs b/vendor/clap/examples/tutorial_builder/04_01_enum.rs
index ad2177c23..e8cf70f5c 100644
--- a/vendor/clap/examples/tutorial_builder/04_01_enum.rs
+++ b/vendor/clap/examples/tutorial_builder/04_01_enum.rs
@@ -1,15 +1,49 @@
-// Note: this requires the `cargo` feature
+use clap::{arg, builder::PossibleValue, command, value_parser, ValueEnum};
-use clap::{arg, command, value_parser, ValueEnum};
-
-#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
+#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
enum Mode {
Fast,
Slow,
}
+// Can also be derived] with feature flag `derive`
+impl ValueEnum for Mode {
+ fn value_variants<'a>() -> &'a [Self] {
+ &[Mode::Fast, Mode::Slow]
+ }
+
+ fn to_possible_value<'a>(&self) -> Option<PossibleValue<'a>> {
+ Some(match self {
+ Mode::Fast => PossibleValue::new("fast"),
+ Mode::Slow => PossibleValue::new("slow"),
+ })
+ }
+}
+
+impl std::fmt::Display for Mode {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ self.to_possible_value()
+ .expect("no values are skipped")
+ .get_name()
+ .fmt(f)
+ }
+}
+
+impl std::str::FromStr for Mode {
+ type Err = String;
+
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
+ for variant in Self::value_variants() {
+ if variant.to_possible_value().unwrap().matches(s, false) {
+ return Ok(*variant);
+ }
+ }
+ Err(format!("Invalid variant: {}", s))
+ }
+}
+
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.arg(
arg!(<MODE>)
.help("What mode to run the program in")
diff --git a/vendor/clap/examples/tutorial_builder/04_01_possible.md b/vendor/clap/examples/tutorial_builder/04_01_possible.md
new file mode 100644
index 000000000..2909bfb17
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/04_01_possible.md
@@ -0,0 +1,29 @@
+```console
+$ 04_01_possible --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 04_01_possible[EXE] <MODE>
+
+ARGS:
+ <MODE> What mode to run the program in [possible values: fast, slow]
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 04_01_possible fast
+Hare
+
+$ 04_01_possible slow
+Tortoise
+
+$ 04_01_possible medium
+? failed
+error: "medium" isn't a valid value for '<MODE>'
+ [possible values: fast, slow]
+
+For more information try --help
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/04_01_possible.rs b/vendor/clap/examples/tutorial_builder/04_01_possible.rs
index f7b0cfb34..3da7aca74 100644
--- a/vendor/clap/examples/tutorial_builder/04_01_possible.rs
+++ b/vendor/clap/examples/tutorial_builder/04_01_possible.rs
@@ -1,9 +1,7 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command};
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.arg(
arg!(<MODE>)
.help("What mode to run the program in")
diff --git a/vendor/clap/examples/tutorial_builder/04_02_parse.md b/vendor/clap/examples/tutorial_builder/04_02_parse.md
new file mode 100644
index 000000000..605bf4b59
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/04_02_parse.md
@@ -0,0 +1,31 @@
+```console
+$ 04_02_parse --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 04_02_parse[EXE] <PORT>
+
+ARGS:
+ <PORT> Network port to use
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 04_02_parse 22
+PORT = 22
+
+$ 04_02_parse foobar
+? failed
+error: Invalid value "foobar" for '<PORT>': invalid digit found in string
+
+For more information try --help
+
+$ 04_02_parse_derive 0
+? failed
+error: Invalid value "0" for '<PORT>': 0 is not in 1..=65535
+
+For more information try --help
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/04_02_parse.rs b/vendor/clap/examples/tutorial_builder/04_02_parse.rs
index c2f3cc533..13f41a18e 100644
--- a/vendor/clap/examples/tutorial_builder/04_02_parse.rs
+++ b/vendor/clap/examples/tutorial_builder/04_02_parse.rs
@@ -1,9 +1,7 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command, value_parser};
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.arg(
arg!(<PORT>)
.help("Network port to use")
diff --git a/vendor/clap/examples/tutorial_builder/04_02_validate.md b/vendor/clap/examples/tutorial_builder/04_02_validate.md
new file mode 100644
index 000000000..a317a8eb7
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/04_02_validate.md
@@ -0,0 +1,31 @@
+```console
+$ 04_02_validate --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 04_02_validate[EXE] <PORT>
+
+ARGS:
+ <PORT> Network port to use
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 04_02_validate 22
+PORT = 22
+
+$ 04_02_validate foobar
+? failed
+error: Invalid value "foobar" for '<PORT>': `foobar` isn't a port number
+
+For more information try --help
+
+$ 04_02_validate 0
+? failed
+error: Invalid value "0" for '<PORT>': Port not in range 1-65535
+
+For more information try --help
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/04_02_validate.rs b/vendor/clap/examples/tutorial_builder/04_02_validate.rs
index e60018a46..ea2f32e67 100644
--- a/vendor/clap/examples/tutorial_builder/04_02_validate.rs
+++ b/vendor/clap/examples/tutorial_builder/04_02_validate.rs
@@ -1,11 +1,9 @@
-// Note: this requires the `cargo` feature
-
use std::ops::RangeInclusive;
use clap::{arg, command};
fn main() {
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
.arg(
arg!(<PORT>)
.help("Network port to use")
diff --git a/vendor/clap/examples/tutorial_builder/04_03_relations.md b/vendor/clap/examples/tutorial_builder/04_03_relations.md
new file mode 100644
index 000000000..3ea336363
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/04_03_relations.md
@@ -0,0 +1,58 @@
+```console
+$ 04_03_relations --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 04_03_relations[EXE] [OPTIONS] <--set-ver <VER>|--major|--minor|--patch> [INPUT_FILE]
+
+ARGS:
+ <INPUT_FILE> some regular input
+
+OPTIONS:
+ -c <CONFIG>
+ -h, --help Print help information
+ --major auto inc major
+ --minor auto inc minor
+ --patch auto inc patch
+ --set-ver <VER> set version manually
+ --spec-in <SPEC_IN> some special input argument
+ -V, --version Print version information
+
+$ 04_03_relations
+? failed
+error: The following required arguments were not provided:
+ <--set-ver <VER>|--major|--minor|--patch>
+
+USAGE:
+ 04_03_relations[EXE] [OPTIONS] <--set-ver <VER>|--major|--minor|--patch> [INPUT_FILE]
+
+For more information try --help
+
+$ 04_03_relations --major
+Version: 2.2.3
+
+$ 04_03_relations --major --minor
+? failed
+error: The argument '--major' cannot be used with '--minor'
+
+USAGE:
+ 04_03_relations[EXE] <--set-ver <VER>|--major|--minor|--patch>
+
+For more information try --help
+
+$ 04_03_relations --major -c config.toml
+? failed
+error: The following required arguments were not provided:
+ <INPUT_FILE|--spec-in <SPEC_IN>>
+
+USAGE:
+ 04_03_relations[EXE] -c <CONFIG> <--set-ver <VER>|--major|--minor|--patch> <INPUT_FILE|--spec-in <SPEC_IN>>
+
+For more information try --help
+
+$ 04_03_relations --major -c config.toml --spec-in input.txt
+Version: 2.2.3
+Doing work using input input.txt and config config.toml
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/04_03_relations.rs b/vendor/clap/examples/tutorial_builder/04_03_relations.rs
index 605e5b48e..8e26d3ea9 100644
--- a/vendor/clap/examples/tutorial_builder/04_03_relations.rs
+++ b/vendor/clap/examples/tutorial_builder/04_03_relations.rs
@@ -1,12 +1,10 @@
-// Note: this requires the `cargo` feature
-
use std::path::PathBuf;
use clap::{arg, command, value_parser, ArgAction, ArgGroup};
fn main() {
// Create application like normal
- let matches = command!()
+ let matches = command!() // requires `cargo` feature
// Add the version arguments
.arg(arg!(--"set-ver" <VER> "set version manually").required(false))
.arg(arg!(--major "auto inc major").action(ArgAction::SetTrue))
@@ -52,9 +50,9 @@ fn main() {
} else {
// Increment the one requested (in a real program, we'd reset the lower numbers)
let (maj, min, pat) = (
- *matches.get_one::<bool>("major").expect("defaulted by clap"),
- *matches.get_one::<bool>("minor").expect("defaulted by clap"),
- *matches.get_one::<bool>("patch").expect("defaulted by clap"),
+ matches.get_flag("major"),
+ matches.get_flag("minor"),
+ matches.get_flag("patch"),
);
match (maj, min, pat) {
(true, _, _) => major += 1,
diff --git a/vendor/clap/examples/tutorial_builder/04_04_custom.md b/vendor/clap/examples/tutorial_builder/04_04_custom.md
new file mode 100644
index 000000000..26a3df1ab
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/04_04_custom.md
@@ -0,0 +1,57 @@
+```console
+$ 04_04_custom --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 04_04_custom[EXE] [OPTIONS] [INPUT_FILE]
+
+ARGS:
+ <INPUT_FILE> some regular input
+
+OPTIONS:
+ -c <CONFIG>
+ -h, --help Print help information
+ --major auto inc major
+ --minor auto inc minor
+ --patch auto inc patch
+ --set-ver <VER> set version manually
+ --spec-in <SPEC_IN> some special input argument
+ -V, --version Print version information
+
+$ 04_04_custom
+? failed
+error: Can only modify one version field
+
+USAGE:
+ 04_04_custom[EXE] [OPTIONS] [INPUT_FILE]
+
+For more information try --help
+
+$ 04_04_custom --major
+Version: 2.2.3
+
+$ 04_04_custom --major --minor
+? failed
+error: Can only modify one version field
+
+USAGE:
+ 04_04_custom[EXE] [OPTIONS] [INPUT_FILE]
+
+For more information try --help
+
+$ 04_04_custom --major -c config.toml
+? failed
+Version: 2.2.3
+error: INPUT_FILE or --spec-in is required when using --config
+
+USAGE:
+ 04_04_custom[EXE] [OPTIONS] [INPUT_FILE]
+
+For more information try --help
+
+$ 04_04_custom --major -c config.toml --spec-in input.txt
+Version: 2.2.3
+Doing work using input input.txt and config config.toml
+
+```
diff --git a/vendor/clap/examples/tutorial_builder/04_04_custom.rs b/vendor/clap/examples/tutorial_builder/04_04_custom.rs
index 3dc080505..fb40b2fc4 100644
--- a/vendor/clap/examples/tutorial_builder/04_04_custom.rs
+++ b/vendor/clap/examples/tutorial_builder/04_04_custom.rs
@@ -1,12 +1,10 @@
-// Note: this requires the `cargo` feature
-
use std::path::PathBuf;
use clap::{arg, command, value_parser, ArgAction, ErrorKind};
fn main() {
// Create application like normal
- let mut cmd = command!()
+ let mut cmd = command!() // requires `cargo` feature
// Add the version arguments
.arg(arg!(--"set-ver" <VER> "set version manually").required(false))
.arg(arg!(--major "auto inc major").action(ArgAction::SetTrue))
@@ -36,10 +34,7 @@ fn main() {
// See if --set-ver was used to set the version manually
let version = if let Some(ver) = matches.get_one::<String>("set-ver") {
- if *matches.get_one::<bool>("major").expect("defaulted by clap")
- || *matches.get_one::<bool>("minor").expect("defaulted by clap")
- || *matches.get_one::<bool>("patch").expect("defaulted by clap")
- {
+ if matches.get_flag("major") || matches.get_flag("minor") || matches.get_flag("patch") {
cmd.error(
ErrorKind::ArgumentConflict,
"Can't do relative and absolute version change",
@@ -50,9 +45,9 @@ fn main() {
} else {
// Increment the one requested (in a real program, we'd reset the lower numbers)
let (maj, min, pat) = (
- *matches.get_one::<bool>("major").expect("defaulted by clap"),
- *matches.get_one::<bool>("minor").expect("defaulted by clap"),
- *matches.get_one::<bool>("patch").expect("defaulted by clap"),
+ matches.get_flag("major"),
+ matches.get_flag("minor"),
+ matches.get_flag("patch"),
);
match (maj, min, pat) {
(true, false, false) => major += 1,
diff --git a/vendor/clap/examples/tutorial_builder/05_01_assert.rs b/vendor/clap/examples/tutorial_builder/05_01_assert.rs
index d6f19ffe5..4b9254230 100644
--- a/vendor/clap/examples/tutorial_builder/05_01_assert.rs
+++ b/vendor/clap/examples/tutorial_builder/05_01_assert.rs
@@ -1,5 +1,3 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command, value_parser};
fn main() {
@@ -13,14 +11,15 @@ fn main() {
}
fn cmd() -> clap::Command<'static> {
- command!().arg(
- arg!(<PORT>)
- .help("Network port to use")
- .value_parser(value_parser!(usize)),
- )
+ command!() // requires `cargo` feature
+ .arg(
+ arg!(<PORT>)
+ .help("Network port to use")
+ .value_parser(value_parser!(usize)),
+ )
}
#[test]
-fn verify_app() {
+fn verify_cmd() {
cmd().debug_assert();
}
diff --git a/vendor/clap/examples/tutorial_builder/README.md b/vendor/clap/examples/tutorial_builder/README.md
deleted file mode 100644
index 945b01e72..000000000
--- a/vendor/clap/examples/tutorial_builder/README.md
+++ /dev/null
@@ -1,658 +0,0 @@
-# Tutorial
-
-*Jump to [derive tutorial](../tutorial_derive/README.md)*
-
-1. [Quick Start](#quick-start)
-2. [Configuring the Parser](#configuring-the-parser)
-3. [Adding Arguments](#adding-arguments)
- 1. [Positionals](#positionals)
- 2. [Options](#options)
- 3. [Flags](#flags)
- 4. [Subcommands](#subcommands)
- 5. [Defaults](#defaults)
-4. Validation
- 1. [Enumerated values](#enumerated-values)
- 2. [Validated values](#validated-values)
- 3. [Argument Relations](#argument-relations)
- 4. [Custom Validation](#custom-validation)
-5. [Tips](#tips)
-6. [Contributing](#contributing)
-
-## Quick Start
-
-You can create an application with several arguments using usage strings.
-
-[Example:](01_quick.rs)
-```console
-$ 01_quick --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 01_quick[EXE] [OPTIONS] [name] [SUBCOMMAND]
-
-ARGS:
- <name> Optional name to operate on
-
-OPTIONS:
- -c, --config <FILE> Sets a custom config file
- -d, --debug Turn debugging information on
- -h, --help Print help information
- -V, --version Print version information
-
-SUBCOMMANDS:
- help Print this message or the help of the given subcommand(s)
- test does testing things
-
-```
-
-By default, the program does nothing:
-```console
-$ 01_quick
-Debug mode is off
-
-```
-
-But you can mix and match the various features
-```console
-$ 01_quick -dd test
-Debug mode is on
-Not printing testing lists...
-
-```
-
-## Configuring the Parser
-
-You use the `Command` the start building a parser.
-
-[Example:](02_apps.rs)
-```console
-$ 02_apps --help
-MyApp 1.0
-Kevin K. <kbknapp@gmail.com>
-Does awesome things
-
-USAGE:
- 02_apps[EXE] --two <VALUE> --one <VALUE>
-
-OPTIONS:
- -h, --help Print help information
- --one <VALUE>
- --two <VALUE>
- -V, --version Print version information
-
-$ 02_apps --version
-MyApp 1.0
-
-```
-
-You can use `command!()` to fill these fields in from your `Cargo.toml`
-file. **This requires the `cargo` feature flag.**
-
-[Example:](02_crate.rs)
-```console
-$ 02_crate --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 02_crate[EXE] --two <VALUE> --one <VALUE>
-
-OPTIONS:
- -h, --help Print help information
- --one <VALUE>
- --two <VALUE>
- -V, --version Print version information
-
-$ 02_crate --version
-clap [..]
-
-```
-
-You can use `Command` methods to change the application level behavior of clap.
-
-[Example:](02_app_settings.rs)
-```console
-$ 02_app_settings --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 02_app_settings[EXE] --two <VALUE> --one <VALUE>
-
-OPTIONS:
- --two <VALUE>
- --one <VALUE>
- -h, --help Print help information
- -V, --version Print version information
-
-$ 02_app_settings --one -1 --one -3 --two 10
-two: "10"
-one: "-3"
-
-```
-
-## Adding Arguments
-
-### Positionals
-
-You can have users specify values by their position on the command-line:
-
-[Example:](03_03_positional.rs)
-```console
-$ 03_03_positional --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_03_positional[EXE] [NAME]
-
-ARGS:
- <NAME>
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 03_03_positional
-NAME: None
-
-$ 03_03_positional bob
-NAME: Some("bob")
-
-```
-
-### Options
-
-You can name your arguments with a flag:
-- Order doesn't matter
-- They can be optional
-- Intent is clearer
-
-[Example:](03_02_option.rs)
-```console
-$ 03_02_option --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_02_option[EXE] [OPTIONS]
-
-OPTIONS:
- -h, --help Print help information
- -n, --name <NAME>
- -V, --version Print version information
-
-$ 03_02_option
-name: None
-
-$ 03_02_option --name bob
-name: Some("bob")
-
-$ 03_02_option --name=bob
-name: Some("bob")
-
-$ 03_02_option -n bob
-name: Some("bob")
-
-$ 03_02_option -n=bob
-name: Some("bob")
-
-$ 03_02_option -nbob
-name: Some("bob")
-
-```
-
-### Flags
-
-Flags can also be switches that can be on/off:
-
-[Example:](03_01_flag_bool.rs)
-```console
-$ 03_01_flag_bool --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_01_flag_bool[EXE] [OPTIONS]
-
-OPTIONS:
- -h, --help Print help information
- -v, --verbose
- -V, --version Print version information
-
-$ 03_01_flag_bool
-verbose: false
-
-$ 03_01_flag_bool --verbose
-verbose: true
-
-$ 03_01_flag_bool --verbose --verbose
-verbose: true
-
-```
-
-Or counted.
-
-[Example:](03_01_flag_count.rs)
-```console
-$ 03_01_flag_count --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_01_flag_count[EXE] [OPTIONS]
-
-OPTIONS:
- -h, --help Print help information
- -v, --verbose
- -V, --version Print version information
-
-$ 03_01_flag_count
-verbose: 0
-
-$ 03_01_flag_count --verbose
-verbose: 1
-
-$ 03_01_flag_count --verbose --verbose
-verbose: 2
-
-```
-
-### Subcommands
-
-Subcommands are defined as `Command`s that get added via `Command::subcommand`. Each
-instance of a Subcommand can have its own version, author(s), Args, and even its own
-subcommands.
-
-[Example:](03_04_subcommands.rs)
-```console
-$ 03_04_subcommands help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_04_subcommands[EXE] <SUBCOMMAND>
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-SUBCOMMANDS:
- add Adds files to myapp
- help Print this message or the help of the given subcommand(s)
-
-$ 03_04_subcommands help add
-03_04_subcommands[EXE]-add [..]
-Adds files to myapp
-
-USAGE:
- 03_04_subcommands[EXE] add [NAME]
-
-ARGS:
- <NAME>
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 03_04_subcommands add bob
-'myapp add' was used, name is: Some("bob")
-
-```
-
-Because we set `Command::arg_required_else_help`:
-```console
-$ 03_04_subcommands
-? failed
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_04_subcommands[EXE] <SUBCOMMAND>
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-SUBCOMMANDS:
- add Adds files to myapp
- help Print this message or the help of the given subcommand(s)
-
-```
-
-Because we set `Command::propagate_version`:
-```console
-$ 03_04_subcommands --version
-clap [..]
-
-$ 03_04_subcommands add --version
-03_04_subcommands[EXE]-add [..]
-
-```
-
-### Defaults
-
-We've previously showed that arguments can be `required` or optional. When
-optional, you work with a `Option` and can `unwrap_or`. Alternatively, you can
-set `Arg::default_value`.
-
-[Example:](03_05_default_values.rs)
-```console
-$ 03_05_default_values --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_05_default_values[EXE] [NAME]
-
-ARGS:
- <NAME> [default: alice]
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 03_05_default_values
-NAME: "alice"
-
-$ 03_05_default_values bob
-NAME: "bob"
-
-```
-
-## Validation
-
-### Enumerated values
-
-If you have arguments of specific values you want to test for, you can use the
-`PossibleValuesParser` or `Arg::value_parser(["val1", ...])` for short.
-
-This allows you specify the valid values for that argument. If the user does not use one of
-those specific values, they will receive a graceful exit with error message informing them
-of the mistake, and what the possible valid values are
-
-[Example:](04_01_possible.rs)
-```console
-$ 04_01_possible --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 04_01_possible[EXE] <MODE>
-
-ARGS:
- <MODE> What mode to run the program in [possible values: fast, slow]
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 04_01_possible fast
-Hare
-
-$ 04_01_possible slow
-Tortoise
-
-$ 04_01_possible medium
-? failed
-error: "medium" isn't a valid value for '<MODE>'
- [possible values: fast, slow]
-
-For more information try --help
-
-```
-
-When enabling the `derive` feature, you can use `ValueEnum` to take care of the boiler plate for you, giving the same results.
-
-[Example:](04_01_enum.rs)
-```console
-$ 04_01_enum --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 04_01_enum[EXE] <MODE>
-
-ARGS:
- <MODE> What mode to run the program in [possible values: fast, slow]
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 04_01_enum fast
-Hare
-
-$ 04_01_enum slow
-Tortoise
-
-$ 04_01_enum medium
-? failed
-error: "medium" isn't a valid value for '<MODE>'
- [possible values: fast, slow]
-
-For more information try --help
-
-```
-
-### Validated values
-
-More generally, you can validate and parse into any data type.
-
-[Example:](04_02_parse.rs)
-```console
-$ 04_02_parse --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 04_02_parse[EXE] <PORT>
-
-ARGS:
- <PORT> Network port to use
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 04_02_parse 22
-PORT = 22
-
-$ 04_02_parse foobar
-? failed
-error: Invalid value "foobar" for '<PORT>': invalid digit found in string
-
-For more information try --help
-
-$ 04_02_parse_derive 0
-? failed
-error: Invalid value "0" for '<PORT>': 0 is not in 1..=65535
-
-For more information try --help
-
-```
-
-A custom parser can be used to improve the error messages or provide additional validation:
-
-[Example:](04_02_validate.rs)
-```console
-$ 04_02_validate --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 04_02_validate[EXE] <PORT>
-
-ARGS:
- <PORT> Network port to use
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 04_02_validate 22
-PORT = 22
-
-$ 04_02_validate foobar
-? failed
-error: Invalid value "foobar" for '<PORT>': `foobar` isn't a port number
-
-For more information try --help
-
-$ 04_02_validate 0
-? failed
-error: Invalid value "0" for '<PORT>': Port not in range 1-65535
-
-For more information try --help
-
-```
-
-### Argument Relations
-
-You can declare dependencies or conflicts between `Arg`s or even `ArgGroup`s.
-
-`ArgGroup`s make it easier to declare relations instead of having to list each
-individually, or when you want a rule to apply "any but not all" arguments.
-
-Perhaps the most common use of `ArgGroup`s is to require one and *only* one argument to be
-present out of a given set. Imagine that you had multiple arguments, and you want one of them to
-be required, but making all of them required isn't feasible because perhaps they conflict with
-each other.
-
-[Example:](04_03_relations.rs)
-```console
-$ 04_03_relations --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 04_03_relations[EXE] [OPTIONS] <--set-ver <VER>|--major|--minor|--patch> [INPUT_FILE]
-
-ARGS:
- <INPUT_FILE> some regular input
-
-OPTIONS:
- -c <CONFIG>
- -h, --help Print help information
- --major auto inc major
- --minor auto inc minor
- --patch auto inc patch
- --set-ver <VER> set version manually
- --spec-in <SPEC_IN> some special input argument
- -V, --version Print version information
-
-$ 04_03_relations
-? failed
-error: The following required arguments were not provided:
- <--set-ver <VER>|--major|--minor|--patch>
-
-USAGE:
- 04_03_relations[EXE] [OPTIONS] <--set-ver <VER>|--major|--minor|--patch> [INPUT_FILE]
-
-For more information try --help
-
-$ 04_03_relations --major
-Version: 2.2.3
-
-$ 04_03_relations --major --minor
-? failed
-error: The argument '--major' cannot be used with '--minor'
-
-USAGE:
- 04_03_relations[EXE] <--set-ver <VER>|--major|--minor|--patch>
-
-For more information try --help
-
-$ 04_03_relations --major -c config.toml
-? failed
-error: The following required arguments were not provided:
- <INPUT_FILE|--spec-in <SPEC_IN>>
-
-USAGE:
- 04_03_relations[EXE] -c <CONFIG> <--set-ver <VER>|--major|--minor|--patch> <INPUT_FILE|--spec-in <SPEC_IN>>
-
-For more information try --help
-
-$ 04_03_relations --major -c config.toml --spec-in input.txt
-Version: 2.2.3
-Doing work using input input.txt and config config.toml
-
-```
-
-### Custom Validation
-
-As a last resort, you can create custom errors with the basics of clap's formatting.
-
-[Example:](04_04_custom.rs)
-```console
-$ 04_04_custom --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 04_04_custom[EXE] [OPTIONS] [INPUT_FILE]
-
-ARGS:
- <INPUT_FILE> some regular input
-
-OPTIONS:
- -c <CONFIG>
- -h, --help Print help information
- --major auto inc major
- --minor auto inc minor
- --patch auto inc patch
- --set-ver <VER> set version manually
- --spec-in <SPEC_IN> some special input argument
- -V, --version Print version information
-
-$ 04_04_custom
-? failed
-error: Can only modify one version field
-
-USAGE:
- 04_04_custom[EXE] [OPTIONS] [INPUT_FILE]
-
-For more information try --help
-
-$ 04_04_custom --major
-Version: 2.2.3
-
-$ 04_04_custom --major --minor
-? failed
-error: Can only modify one version field
-
-USAGE:
- 04_04_custom[EXE] [OPTIONS] [INPUT_FILE]
-
-For more information try --help
-
-$ 04_04_custom --major -c config.toml
-? failed
-Version: 2.2.3
-error: INPUT_FILE or --spec-in is required when using --config
-
-USAGE:
- 04_04_custom[EXE] [OPTIONS] [INPUT_FILE]
-
-For more information try --help
-
-$ 04_04_custom --major -c config.toml --spec-in input.txt
-Version: 2.2.3
-Doing work using input input.txt and config config.toml
-
-```
-
-## Tips
-
-- For more complex demonstration of features, see our [examples](../README.md).
-- Proactively check for bad `Command` configurations by calling `Command::debug_assert` in a test ([example](05_01_assert.rs))
-
-## Contributing
-
-New example code:
-- Please update the corresponding section in the [derive tutorial](../tutorial_derive/README.md)
-- Building: They must be added to [Cargo.toml](../../Cargo.toml) with the appropriate `required-features`.
-- Testing: Ensure there is a markdown file with [trycmd](https://docs.rs/trycmd) syntax (generally they'll go in here).
-
-See also the general [CONTRIBUTING](../../CONTRIBUTING.md).
diff --git a/vendor/clap/examples/tutorial_derive/01_quick.md b/vendor/clap/examples/tutorial_derive/01_quick.md
new file mode 100644
index 000000000..6f70d2cce
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/01_quick.md
@@ -0,0 +1,37 @@
+```console
+$ 01_quick_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 01_quick_derive[EXE] [OPTIONS] [NAME] [SUBCOMMAND]
+
+ARGS:
+ <NAME> Optional name to operate on
+
+OPTIONS:
+ -c, --config <FILE> Sets a custom config file
+ -d, --debug Turn debugging information on
+ -h, --help Print help information
+ -V, --version Print version information
+
+SUBCOMMANDS:
+ help Print this message or the help of the given subcommand(s)
+ test does testing things
+
+```
+
+By default, the program does nothing:
+```console
+$ 01_quick_derive
+Debug mode is off
+
+```
+
+But you can mix and match the various features
+```console
+$ 01_quick_derive -dd test
+Debug mode is on
+Not printing testing lists...
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/02_app_settings.md b/vendor/clap/examples/tutorial_derive/02_app_settings.md
new file mode 100644
index 000000000..ee16c66df
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/02_app_settings.md
@@ -0,0 +1,19 @@
+```console
+$ 02_app_settings_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 02_app_settings_derive[EXE] --two <TWO> --one <ONE>
+
+OPTIONS:
+ --two <TWO>
+ --one <ONE>
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 02_app_settings_derive --one -1 --one -3 --two 10
+two: "10"
+one: "-3"
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/02_apps.md b/vendor/clap/examples/tutorial_derive/02_apps.md
new file mode 100644
index 000000000..0141581c4
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/02_apps.md
@@ -0,0 +1,19 @@
+```console
+$ 02_apps_derive --help
+MyApp 1.0
+Kevin K. <kbknapp@gmail.com>
+Does awesome things
+
+USAGE:
+ 02_apps_derive[EXE] --two <TWO> --one <ONE>
+
+OPTIONS:
+ -h, --help Print help information
+ --one <ONE>
+ --two <TWO>
+ -V, --version Print version information
+
+$ 02_apps_derive --version
+MyApp 1.0
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/02_crate.md b/vendor/clap/examples/tutorial_derive/02_crate.md
new file mode 100644
index 000000000..92c820758
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/02_crate.md
@@ -0,0 +1,18 @@
+```console
+$ 02_crate_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 02_crate_derive[EXE] --two <TWO> --one <ONE>
+
+OPTIONS:
+ -h, --help Print help information
+ --one <ONE>
+ --two <TWO>
+ -V, --version Print version information
+
+$ 02_crate_derive --version
+clap [..]
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/02_crate.rs b/vendor/clap/examples/tutorial_derive/02_crate.rs
index df16468d0..5576f998c 100644
--- a/vendor/clap/examples/tutorial_derive/02_crate.rs
+++ b/vendor/clap/examples/tutorial_derive/02_crate.rs
@@ -1,7 +1,7 @@
use clap::Parser;
#[derive(Parser)]
-#[clap(author, version, about, long_about = None)]
+#[clap(author, version, about, long_about = None)] // Read from `Cargo.toml`
struct Cli {
#[clap(long, value_parser)]
two: String,
diff --git a/vendor/clap/examples/tutorial_derive/03_01_flag_bool.md b/vendor/clap/examples/tutorial_derive/03_01_flag_bool.md
new file mode 100644
index 000000000..0baaa10ca
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/03_01_flag_bool.md
@@ -0,0 +1,23 @@
+```console
+$ 03_01_flag_bool_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_01_flag_bool_derive[EXE] [OPTIONS]
+
+OPTIONS:
+ -h, --help Print help information
+ -v, --verbose
+ -V, --version Print version information
+
+$ 03_01_flag_bool_derive
+verbose: false
+
+$ 03_01_flag_bool_derive --verbose
+verbose: true
+
+$ 03_01_flag_bool_derive --verbose --verbose
+verbose: true
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/03_01_flag_count.md b/vendor/clap/examples/tutorial_derive/03_01_flag_count.md
new file mode 100644
index 000000000..3d5a53084
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/03_01_flag_count.md
@@ -0,0 +1,23 @@
+```console
+$ 03_01_flag_count_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_01_flag_count_derive[EXE] [OPTIONS]
+
+OPTIONS:
+ -h, --help Print help information
+ -v, --verbose
+ -V, --version Print version information
+
+$ 03_01_flag_count_derive
+verbose: 0
+
+$ 03_01_flag_count_derive --verbose
+verbose: 1
+
+$ 03_01_flag_count_derive --verbose --verbose
+verbose: 2
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/03_02_option.md b/vendor/clap/examples/tutorial_derive/03_02_option.md
new file mode 100644
index 000000000..84ff7fa74
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/03_02_option.md
@@ -0,0 +1,32 @@
+```console
+$ 03_02_option_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_02_option_derive[EXE] [OPTIONS]
+
+OPTIONS:
+ -h, --help Print help information
+ -n, --name <NAME>
+ -V, --version Print version information
+
+$ 03_02_option_derive
+name: None
+
+$ 03_02_option_derive --name bob
+name: Some("bob")
+
+$ 03_02_option_derive --name=bob
+name: Some("bob")
+
+$ 03_02_option_derive -n bob
+name: Some("bob")
+
+$ 03_02_option_derive -n=bob
+name: Some("bob")
+
+$ 03_02_option_derive -nbob
+name: Some("bob")
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/03_03_positional.md b/vendor/clap/examples/tutorial_derive/03_03_positional.md
new file mode 100644
index 000000000..7281fe3ff
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/03_03_positional.md
@@ -0,0 +1,22 @@
+```console
+$ 03_03_positional_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_03_positional_derive[EXE] [NAME]
+
+ARGS:
+ <NAME>
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 03_03_positional_derive
+name: None
+
+$ 03_03_positional_derive bob
+name: Some("bob")
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/03_04_subcommands.md b/vendor/clap/examples/tutorial_derive/03_04_subcommands.md
new file mode 100644
index 000000000..02f96e3d3
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/03_04_subcommands.md
@@ -0,0 +1,64 @@
+```console
+$ 03_04_subcommands_derive help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_04_subcommands_derive[EXE] <SUBCOMMAND>
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+SUBCOMMANDS:
+ add Adds files to myapp
+ help Print this message or the help of the given subcommand(s)
+
+$ 03_04_subcommands_derive help add
+03_04_subcommands_derive[EXE]-add [..]
+Adds files to myapp
+
+USAGE:
+ 03_04_subcommands_derive[EXE] add [NAME]
+
+ARGS:
+ <NAME>
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 03_04_subcommands_derive add bob
+'myapp add' was used, name is: Some("bob")
+
+```
+
+Because we used `command: Commands` instead of `command: Option<Commands>`:
+```console
+$ 03_04_subcommands_derive
+? failed
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_04_subcommands_derive[EXE] <SUBCOMMAND>
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+SUBCOMMANDS:
+ add Adds files to myapp
+ help Print this message or the help of the given subcommand(s)
+
+```
+
+Because we added `#[clap(propagate_version = true)]`:
+```console
+$ 03_04_subcommands_derive --version
+clap [..]
+
+$ 03_04_subcommands_derive add --version
+03_04_subcommands_derive[EXE]-add [..]
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/03_05_default_values.md b/vendor/clap/examples/tutorial_derive/03_05_default_values.md
new file mode 100644
index 000000000..f7315e736
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/03_05_default_values.md
@@ -0,0 +1,22 @@
+```console
+$ 03_05_default_values_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 03_05_default_values_derive[EXE] [NAME]
+
+ARGS:
+ <NAME> [default: alice]
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 03_05_default_values_derive
+name: "alice"
+
+$ 03_05_default_values_derive bob
+name: "bob"
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/04_01_enum.md b/vendor/clap/examples/tutorial_derive/04_01_enum.md
new file mode 100644
index 000000000..2523af924
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/04_01_enum.md
@@ -0,0 +1,29 @@
+```console
+$ 04_01_enum_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 04_01_enum_derive[EXE] <MODE>
+
+ARGS:
+ <MODE> What mode to run the program in [possible values: fast, slow]
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 04_01_enum_derive fast
+Hare
+
+$ 04_01_enum_derive slow
+Tortoise
+
+$ 04_01_enum_derive medium
+? failed
+error: "medium" isn't a valid value for '<MODE>'
+ [possible values: fast, slow]
+
+For more information try --help
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/04_01_enum.rs b/vendor/clap/examples/tutorial_derive/04_01_enum.rs
index 84b4cace4..1ac984288 100644
--- a/vendor/clap/examples/tutorial_derive/04_01_enum.rs
+++ b/vendor/clap/examples/tutorial_derive/04_01_enum.rs
@@ -1,4 +1,4 @@
-use clap::{ArgEnum, Parser};
+use clap::{Parser, ValueEnum};
#[derive(Parser)]
#[clap(author, version, about, long_about = None)]
@@ -8,7 +8,7 @@ struct Cli {
mode: Mode,
}
-#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ArgEnum)]
+#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
enum Mode {
Fast,
Slow,
diff --git a/vendor/clap/examples/tutorial_derive/04_02_parse.md b/vendor/clap/examples/tutorial_derive/04_02_parse.md
new file mode 100644
index 000000000..6079ef193
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/04_02_parse.md
@@ -0,0 +1,31 @@
+```console
+$ 04_02_parse_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 04_02_parse_derive[EXE] <PORT>
+
+ARGS:
+ <PORT> Network port to use
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 04_02_parse_derive 22
+PORT = 22
+
+$ 04_02_parse_derive foobar
+? failed
+error: Invalid value "foobar" for '<PORT>': invalid digit found in string
+
+For more information try --help
+
+$ 04_02_parse_derive 0
+? failed
+error: Invalid value "0" for '<PORT>': 0 is not in 1..=65535
+
+For more information try --help
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/04_02_validate.md b/vendor/clap/examples/tutorial_derive/04_02_validate.md
new file mode 100644
index 000000000..cc43440ef
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/04_02_validate.md
@@ -0,0 +1,31 @@
+```console
+$ 04_02_validate_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 04_02_validate_derive[EXE] <PORT>
+
+ARGS:
+ <PORT> Network port to use
+
+OPTIONS:
+ -h, --help Print help information
+ -V, --version Print version information
+
+$ 04_02_validate_derive 22
+PORT = 22
+
+$ 04_02_validate_derive foobar
+? failed
+error: Invalid value "foobar" for '<PORT>': `foobar` isn't a port number
+
+For more information try --help
+
+$ 04_02_validate_derive 0
+? failed
+error: Invalid value "0" for '<PORT>': Port not in range 1-65535
+
+For more information try --help
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/04_03_relations.md b/vendor/clap/examples/tutorial_derive/04_03_relations.md
new file mode 100644
index 000000000..4f5703d82
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/04_03_relations.md
@@ -0,0 +1,58 @@
+```console
+$ 04_03_relations_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 04_03_relations_derive[EXE] [OPTIONS] <--set-ver <VER>|--major|--minor|--patch> [INPUT_FILE]
+
+ARGS:
+ <INPUT_FILE> some regular input
+
+OPTIONS:
+ -c <CONFIG>
+ -h, --help Print help information
+ --major auto inc major
+ --minor auto inc minor
+ --patch auto inc patch
+ --set-ver <VER> set version manually
+ --spec-in <SPEC_IN> some special input argument
+ -V, --version Print version information
+
+$ 04_03_relations_derive
+? failed
+error: The following required arguments were not provided:
+ <--set-ver <VER>|--major|--minor|--patch>
+
+USAGE:
+ 04_03_relations_derive[EXE] [OPTIONS] <--set-ver <VER>|--major|--minor|--patch> [INPUT_FILE]
+
+For more information try --help
+
+$ 04_03_relations_derive --major
+Version: 2.2.3
+
+$ 04_03_relations_derive --major --minor
+? failed
+error: The argument '--major' cannot be used with '--minor'
+
+USAGE:
+ 04_03_relations_derive[EXE] <--set-ver <VER>|--major|--minor|--patch>
+
+For more information try --help
+
+$ 04_03_relations_derive --major -c config.toml
+? failed
+error: The following required arguments were not provided:
+ <INPUT_FILE|--spec-in <SPEC_IN>>
+
+USAGE:
+ 04_03_relations_derive[EXE] -c <CONFIG> <--set-ver <VER>|--major|--minor|--patch> <INPUT_FILE|--spec-in <SPEC_IN>>
+
+For more information try --help
+
+$ 04_03_relations_derive --major -c config.toml --spec-in input.txt
+Version: 2.2.3
+Doing work using input input.txt and config config.toml
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/04_03_relations.rs b/vendor/clap/examples/tutorial_derive/04_03_relations.rs
index f8523902d..37efe95e3 100644
--- a/vendor/clap/examples/tutorial_derive/04_03_relations.rs
+++ b/vendor/clap/examples/tutorial_derive/04_03_relations.rs
@@ -44,7 +44,7 @@ fn main() {
let mut minor = 2;
let mut patch = 3;
- // See if --set-ver was used to set the version manually
+ // See if --set_ver was used to set the version manually
let version = if let Some(ver) = cli.set_ver.as_deref() {
ver.to_string()
} else {
diff --git a/vendor/clap/examples/tutorial_derive/04_04_custom.md b/vendor/clap/examples/tutorial_derive/04_04_custom.md
new file mode 100644
index 000000000..0f19bfe31
--- /dev/null
+++ b/vendor/clap/examples/tutorial_derive/04_04_custom.md
@@ -0,0 +1,57 @@
+```console
+$ 04_04_custom_derive --help
+clap [..]
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+USAGE:
+ 04_04_custom_derive[EXE] [OPTIONS] [INPUT_FILE]
+
+ARGS:
+ <INPUT_FILE> some regular input
+
+OPTIONS:
+ -c <CONFIG>
+ -h, --help Print help information
+ --major auto inc major
+ --minor auto inc minor
+ --patch auto inc patch
+ --set-ver <VER> set version manually
+ --spec-in <SPEC_IN> some special input argument
+ -V, --version Print version information
+
+$ 04_04_custom_derive
+? failed
+error: Can only modify one version field
+
+USAGE:
+ clap [OPTIONS] [INPUT_FILE]
+
+For more information try --help
+
+$ 04_04_custom_derive --major
+Version: 2.2.3
+
+$ 04_04_custom_derive --major --minor
+? failed
+error: Can only modify one version field
+
+USAGE:
+ clap [OPTIONS] [INPUT_FILE]
+
+For more information try --help
+
+$ 04_04_custom_derive --major -c config.toml
+? failed
+Version: 2.2.3
+error: INPUT_FILE or --spec-in is required when using --config
+
+USAGE:
+ clap [OPTIONS] [INPUT_FILE]
+
+For more information try --help
+
+$ 04_04_custom_derive --major -c config.toml --spec-in input.txt
+Version: 2.2.3
+Doing work using input input.txt and config config.toml
+
+```
diff --git a/vendor/clap/examples/tutorial_derive/05_01_assert.rs b/vendor/clap/examples/tutorial_derive/05_01_assert.rs
index f5fa3f6c5..66dca727f 100644
--- a/vendor/clap/examples/tutorial_derive/05_01_assert.rs
+++ b/vendor/clap/examples/tutorial_derive/05_01_assert.rs
@@ -15,7 +15,7 @@ fn main() {
}
#[test]
-fn verify_app() {
+fn verify_cli() {
use clap::CommandFactory;
Cli::command().debug_assert()
}
diff --git a/vendor/clap/examples/tutorial_derive/README.md b/vendor/clap/examples/tutorial_derive/README.md
deleted file mode 100644
index 6127b6cd3..000000000
--- a/vendor/clap/examples/tutorial_derive/README.md
+++ /dev/null
@@ -1,639 +0,0 @@
-# Tutorial
-
-*Jump to [builder tutorial](../tutorial_builder/README.md)*
-
-1. [Quick Start](#quick-start)
-2. [Configuring the Parser](#configuring-the-parser)
-3. [Adding Arguments](#adding-arguments)
- 1. [Positionals](#positionals)
- 2. [Options](#options)
- 3. [Flags](#flags)
- 4. [Subcommands](#subcommands)
- 5. [Defaults](#defaults)
-4. Validation
- 1. [Enumerated values](#enumerated-values)
- 2. [Validated values](#validated-values)
- 3. [Argument Relations](#argument-relations)
- 4. [Custom Validation](#custom-validation)
-5. [Tips](#tips)
-6. [Contributing](#contributing)
-
-## Quick Start
-
-You can create an application declaratively with a `struct` and some
-attributes. **This requires enabling the `derive` feature flag.**
-
-[Example:](01_quick.rs)
-```console
-$ 01_quick_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 01_quick_derive[EXE] [OPTIONS] [NAME] [SUBCOMMAND]
-
-ARGS:
- <NAME> Optional name to operate on
-
-OPTIONS:
- -c, --config <FILE> Sets a custom config file
- -d, --debug Turn debugging information on
- -h, --help Print help information
- -V, --version Print version information
-
-SUBCOMMANDS:
- help Print this message or the help of the given subcommand(s)
- test does testing things
-
-```
-
-By default, the program does nothing:
-```console
-$ 01_quick_derive
-Debug mode is off
-
-```
-
-But you can mix and match the various features
-```console
-$ 01_quick_derive -dd test
-Debug mode is on
-Not printing testing lists...
-
-```
-
-In addition to this tutorial, see the [derive reference](../derive_ref/README.md).
-
-## Configuring the Parser
-
-You use derive `Parser` the start building a parser.
-
-[Example:](02_apps.rs)
-```console
-$ 02_apps_derive --help
-MyApp 1.0
-Kevin K. <kbknapp@gmail.com>
-Does awesome things
-
-USAGE:
- 02_apps_derive[EXE] --two <TWO> --one <ONE>
-
-OPTIONS:
- -h, --help Print help information
- --one <ONE>
- --two <TWO>
- -V, --version Print version information
-
-$ 02_apps_derive --version
-MyApp 1.0
-
-```
-
-You can use `#[clap(author, version, about)]` attribute defaults to fill these fields in from your `Cargo.toml` file.
-
-[Example:](02_crate.rs)
-```console
-$ 02_crate_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 02_crate_derive[EXE] --two <TWO> --one <ONE>
-
-OPTIONS:
- -h, --help Print help information
- --one <ONE>
- --two <TWO>
- -V, --version Print version information
-
-$ 02_crate_derive --version
-clap [..]
-
-```
-
-You can use attributes to change the application level behavior of clap. Any `Command` builder function can be used as an attribute.
-
-[Example:](02_app_settings.rs)
-```console
-$ 02_app_settings_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 02_app_settings_derive[EXE] --two <TWO> --one <ONE>
-
-OPTIONS:
- --two <TWO>
- --one <ONE>
- -h, --help Print help information
- -V, --version Print version information
-
-$ 02_app_settings_derive --one -1 --one -3 --two 10
-two: "10"
-one: "-3"
-
-```
-
-## Adding Arguments
-
-### Positionals
-
-You can have users specify values by their position on the command-line:
-
-[Example:](03_03_positional.rs)
-```console
-$ 03_03_positional_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_03_positional_derive[EXE] [NAME]
-
-ARGS:
- <NAME>
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 03_03_positional_derive
-name: None
-
-$ 03_03_positional_derive bob
-name: Some("bob")
-
-```
-
-### Options
-
-You can name your arguments with a flag:
-- Order doesn't matter
-- They can be optional
-- Intent is clearer
-
-The `#[clap(short = 'c')]` and `#[clap(long = "name")]` attributes that define
-the flags are `Arg` methods that are derived from the field name when no value
-is specified (`#[clap(short)]` and `#[clap(long)]`).
-
-[Example:](03_02_option.rs)
-```console
-$ 03_02_option_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_02_option_derive[EXE] [OPTIONS]
-
-OPTIONS:
- -h, --help Print help information
- -n, --name <NAME>
- -V, --version Print version information
-
-$ 03_02_option_derive
-name: None
-
-$ 03_02_option_derive --name bob
-name: Some("bob")
-
-$ 03_02_option_derive --name=bob
-name: Some("bob")
-
-$ 03_02_option_derive -n bob
-name: Some("bob")
-
-$ 03_02_option_derive -n=bob
-name: Some("bob")
-
-$ 03_02_option_derive -nbob
-name: Some("bob")
-
-```
-
-### Flags
-
-Flags can also be switches that can be on/off. This is enabled via the
-`#[clap(parse(from_flag)]` attribute though this is implied when the field is a
-`bool`.
-
-[Example:](03_01_flag_bool.rs)
-```console
-$ 03_01_flag_bool_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_01_flag_bool_derive[EXE] [OPTIONS]
-
-OPTIONS:
- -h, --help Print help information
- -v, --verbose
- -V, --version Print version information
-
-$ 03_01_flag_bool_derive
-verbose: false
-
-$ 03_01_flag_bool_derive --verbose
-verbose: true
-
-$ 03_01_flag_bool_derive --verbose --verbose
-verbose: true
-
-```
-
-Or counted with `#[clap(action = clap::ArgAction::Count)]`:
-
-[Example:](03_01_flag_count.rs)
-```console
-$ 03_01_flag_count_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_01_flag_count_derive[EXE] [OPTIONS]
-
-OPTIONS:
- -h, --help Print help information
- -v, --verbose
- -V, --version Print version information
-
-$ 03_01_flag_count_derive
-verbose: 0
-
-$ 03_01_flag_count_derive --verbose
-verbose: 1
-
-$ 03_01_flag_count_derive --verbose --verbose
-verbose: 2
-
-```
-
-### Subcommands
-
-Subcommands are derived with `#[derive(Subcommand)]` and be added via `#[clap(subcommand)]` attribute. Each
-instance of a Subcommand can have its own version, author(s), Args, and even its own
-subcommands.
-
-[Example:](03_04_subcommands.rs)
-```console
-$ 03_04_subcommands_derive help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_04_subcommands_derive[EXE] <SUBCOMMAND>
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-SUBCOMMANDS:
- add Adds files to myapp
- help Print this message or the help of the given subcommand(s)
-
-$ 03_04_subcommands_derive help add
-03_04_subcommands_derive[EXE]-add [..]
-Adds files to myapp
-
-USAGE:
- 03_04_subcommands_derive[EXE] add [NAME]
-
-ARGS:
- <NAME>
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 03_04_subcommands_derive add bob
-'myapp add' was used, name is: Some("bob")
-
-```
-
-Above, we used a struct-variant to define the `add` subcommand. Alternatively,
-you can
-[use a struct for your subcommand's arguments](03_04_subcommands_alt.rs).
-
-Because we used `command: Commands` instead of `command: Option<Commands>`:
-```console
-$ 03_04_subcommands_derive
-? failed
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_04_subcommands_derive[EXE] <SUBCOMMAND>
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-SUBCOMMANDS:
- add Adds files to myapp
- help Print this message or the help of the given subcommand(s)
-
-```
-
-Because we added `#[clap(propagate_version = true)]`:
-```console
-$ 03_04_subcommands_derive --version
-clap [..]
-
-$ 03_04_subcommands_derive add --version
-03_04_subcommands_derive[EXE]-add [..]
-
-```
-
-### Defaults
-
-We've previously showed that arguments can be `required` or optional. When
-optional, you work with an `Option` and can `unwrap_or`. Alternatively, you can
-set `#[clap(default_value_t)]`.
-
-[Example:](03_05_default_values.rs)
-```console
-$ 03_05_default_values_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 03_05_default_values_derive[EXE] [NAME]
-
-ARGS:
- <NAME> [default: alice]
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 03_05_default_values_derive
-name: "alice"
-
-$ 03_05_default_values_derive bob
-name: "bob"
-
-```
-
-## Validation
-
-### Enumerated values
-
-If you have arguments of specific values you want to test for, you can derive
-`ValueEnum`.
-
-This allows you specify the valid values for that argument. If the user does not use one of
-those specific values, they will receive a graceful exit with error message informing them
-of the mistake, and what the possible valid values are
-
-[Example:](04_01_enum.rs)
-```console
-$ 04_01_enum_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 04_01_enum_derive[EXE] <MODE>
-
-ARGS:
- <MODE> What mode to run the program in [possible values: fast, slow]
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 04_01_enum_derive fast
-Hare
-
-$ 04_01_enum_derive slow
-Tortoise
-
-$ 04_01_enum_derive medium
-? failed
-error: "medium" isn't a valid value for '<MODE>'
- [possible values: fast, slow]
-
-For more information try --help
-
-```
-
-### Validated values
-
-More generally, you can validate and parse into any data type.
-
-[Example:](04_02_parse.rs)
-```console
-$ 04_02_parse_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 04_02_parse_derive[EXE] <PORT>
-
-ARGS:
- <PORT> Network port to use
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 04_02_parse_derive 22
-PORT = 22
-
-$ 04_02_parse_derive foobar
-? failed
-error: Invalid value "foobar" for '<PORT>': invalid digit found in string
-
-For more information try --help
-
-$ 04_02_parse_derive 0
-? failed
-error: Invalid value "0" for '<PORT>': 0 is not in 1..=65535
-
-For more information try --help
-
-```
-
-A custom parser can be used to improve the error messages or provide additional validation:
-
-[Example:](04_02_validate.rs)
-```console
-$ 04_02_validate_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 04_02_validate_derive[EXE] <PORT>
-
-ARGS:
- <PORT> Network port to use
-
-OPTIONS:
- -h, --help Print help information
- -V, --version Print version information
-
-$ 04_02_validate_derive 22
-PORT = 22
-
-$ 04_02_validate_derive foobar
-? failed
-error: Invalid value "foobar" for '<PORT>': `foobar` isn't a port number
-
-For more information try --help
-
-$ 04_02_validate_derive 0
-? failed
-error: Invalid value "0" for '<PORT>': Port not in range 1-65535
-
-For more information try --help
-
-```
-
-### Argument Relations
-
-You can declare dependencies or conflicts between `Arg`s or even `ArgGroup`s.
-
-`ArgGroup`s make it easier to declare relations instead of having to list each
-individually, or when you want a rule to apply "any but not all" arguments.
-
-Perhaps the most common use of `ArgGroup`s is to require one and *only* one argument to be
-present out of a given set. Imagine that you had multiple arguments, and you want one of them to
-be required, but making all of them required isn't feasible because perhaps they conflict with
-each other.
-
-[Example:](04_03_relations.rs)
-```console
-$ 04_03_relations_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 04_03_relations_derive[EXE] [OPTIONS] <--set-ver <VER>|--major|--minor|--patch> [INPUT_FILE]
-
-ARGS:
- <INPUT_FILE> some regular input
-
-OPTIONS:
- -c <CONFIG>
- -h, --help Print help information
- --major auto inc major
- --minor auto inc minor
- --patch auto inc patch
- --set-ver <VER> set version manually
- --spec-in <SPEC_IN> some special input argument
- -V, --version Print version information
-
-$ 04_03_relations_derive
-? failed
-error: The following required arguments were not provided:
- <--set-ver <VER>|--major|--minor|--patch>
-
-USAGE:
- 04_03_relations_derive[EXE] [OPTIONS] <--set-ver <VER>|--major|--minor|--patch> [INPUT_FILE]
-
-For more information try --help
-
-$ 04_03_relations_derive --major
-Version: 2.2.3
-
-$ 04_03_relations_derive --major --minor
-? failed
-error: The argument '--major' cannot be used with '--minor'
-
-USAGE:
- 04_03_relations_derive[EXE] <--set-ver <VER>|--major|--minor|--patch>
-
-For more information try --help
-
-$ 04_03_relations_derive --major -c config.toml
-? failed
-error: The following required arguments were not provided:
- <INPUT_FILE|--spec-in <SPEC_IN>>
-
-USAGE:
- 04_03_relations_derive[EXE] -c <CONFIG> <--set-ver <VER>|--major|--minor|--patch> <INPUT_FILE|--spec-in <SPEC_IN>>
-
-For more information try --help
-
-$ 04_03_relations_derive --major -c config.toml --spec-in input.txt
-Version: 2.2.3
-Doing work using input input.txt and config config.toml
-
-```
-
-### Custom Validation
-
-As a last resort, you can create custom errors with the basics of clap's formatting.
-
-[Example:](04_04_custom.rs)
-```console
-$ 04_04_custom_derive --help
-clap [..]
-A simple to use, efficient, and full-featured Command Line Argument Parser
-
-USAGE:
- 04_04_custom_derive[EXE] [OPTIONS] [INPUT_FILE]
-
-ARGS:
- <INPUT_FILE> some regular input
-
-OPTIONS:
- -c <CONFIG>
- -h, --help Print help information
- --major auto inc major
- --minor auto inc minor
- --patch auto inc patch
- --set-ver <VER> set version manually
- --spec-in <SPEC_IN> some special input argument
- -V, --version Print version information
-
-$ 04_04_custom_derive
-? failed
-error: Can only modify one version field
-
-USAGE:
- clap [OPTIONS] [INPUT_FILE]
-
-For more information try --help
-
-$ 04_04_custom_derive --major
-Version: 2.2.3
-
-$ 04_04_custom_derive --major --minor
-? failed
-error: Can only modify one version field
-
-USAGE:
- clap [OPTIONS] [INPUT_FILE]
-
-For more information try --help
-
-$ 04_04_custom_derive --major -c config.toml
-? failed
-Version: 2.2.3
-error: INPUT_FILE or --spec-in is required when using --config
-
-USAGE:
- clap [OPTIONS] [INPUT_FILE]
-
-For more information try --help
-
-$ 04_04_custom_derive --major -c config.toml --spec-in input.txt
-Version: 2.2.3
-Doing work using input input.txt and config config.toml
-
-```
-
-## Tips
-
-- For more complex demonstration of features, see our [examples](../README.md).
-- See the [derive reference](../derive_ref/README.md) to understand how to use
- anything in the [builder API](https://docs.rs/clap/) in the derive API.
-- Proactively check for bad `Command` configurations by calling `Command::debug_assert` in a test ([example](05_01_assert.rs))
-
-## Contributing
-
-New example code:
-- Please update the corresponding section in the [builder tutorial](../tutorial_builder/README.md)
-- Building: They must be added to [Cargo.toml](../../Cargo.toml) with the appropriate `required-features`.
-- Testing: Ensure there is a markdown file with [trycmd](https://docs.rs/trycmd) syntax (generally they'll go in here).
-
-See also the general [CONTRIBUTING](../../CONTRIBUTING.md).
diff --git a/vendor/clap/examples/typed-derive.md b/vendor/clap/examples/typed-derive.md
index 7c61f70d9..9c7615c63 100644
--- a/vendor/clap/examples/typed-derive.md
+++ b/vendor/clap/examples/typed-derive.md
@@ -1,6 +1,4 @@
-*Jump to [source](typed-derive.rs)*
-
-**This requires enabling the `derive` feature flag.**
+**This requires enabling the [`derive` feature flag][crate::_features].**
Help:
```console
diff --git a/vendor/clap/examples/typed-derive.rs b/vendor/clap/examples/typed-derive.rs
index 85c750f9c..31084029d 100644
--- a/vendor/clap/examples/typed-derive.rs
+++ b/vendor/clap/examples/typed-derive.rs
@@ -1,9 +1,7 @@
-// Note: this requires the `derive` feature
-
use clap::Parser;
use std::error::Error;
-#[derive(Parser, Debug)]
+#[derive(Parser, Debug)] // requires `derive` feature
struct Args {
/// Implicitly using `std::str::FromStr`
#[clap(short = 'O', value_parser)]
diff --git a/vendor/clap/src/_cookbook/cargo_example.rs b/vendor/clap/src/_cookbook/cargo_example.rs
new file mode 100644
index 000000000..ec5d582db
--- /dev/null
+++ b/vendor/clap/src/_cookbook/cargo_example.rs
@@ -0,0 +1,7 @@
+//! # Example: cargo subcommand (Builder API)
+//!
+//! ```rust
+#![doc = include_str!("../../examples/cargo-example.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/cargo-example.md")]
diff --git a/vendor/clap/src/_cookbook/cargo_example_derive b/vendor/clap/src/_cookbook/cargo_example_derive
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/vendor/clap/src/_cookbook/cargo_example_derive
diff --git a/vendor/clap/src/_cookbook/cargo_example_derive.rs b/vendor/clap/src/_cookbook/cargo_example_derive.rs
new file mode 100644
index 000000000..d49f956f9
--- /dev/null
+++ b/vendor/clap/src/_cookbook/cargo_example_derive.rs
@@ -0,0 +1,7 @@
+//! # Example: cargo subcommand (Derive API)
+//!
+//! ```rust
+#![doc = include_str!("../../examples/cargo-example-derive.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/cargo-example-derive.md")]
diff --git a/vendor/clap/src/_cookbook/escaped_positional.rs b/vendor/clap/src/_cookbook/escaped_positional.rs
new file mode 100644
index 000000000..99a3f83f3
--- /dev/null
+++ b/vendor/clap/src/_cookbook/escaped_positional.rs
@@ -0,0 +1,7 @@
+//! # Example (Builder API)
+//!
+//! ```rust
+#![doc = include_str!("../../examples/escaped-positional.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/escaped-positional.md")]
diff --git a/vendor/clap/src/_cookbook/escaped_positional_derive.rs b/vendor/clap/src/_cookbook/escaped_positional_derive.rs
new file mode 100644
index 000000000..e6f99ad17
--- /dev/null
+++ b/vendor/clap/src/_cookbook/escaped_positional_derive.rs
@@ -0,0 +1,7 @@
+//! # Example (Derive API)
+//!
+//! ```rust
+#![doc = include_str!("../../examples/escaped-positional-derive.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/escaped-positional-derive.md")]
diff --git a/vendor/clap/src/_cookbook/git.rs b/vendor/clap/src/_cookbook/git.rs
new file mode 100644
index 000000000..03a926ca8
--- /dev/null
+++ b/vendor/clap/src/_cookbook/git.rs
@@ -0,0 +1,7 @@
+//! # Example: git-like CLI (Builder API)
+//!
+//! ```rust
+#![doc = include_str!("../../examples/git.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/git.md")]
diff --git a/vendor/clap/src/_cookbook/git_derive.rs b/vendor/clap/src/_cookbook/git_derive.rs
new file mode 100644
index 000000000..d3119736d
--- /dev/null
+++ b/vendor/clap/src/_cookbook/git_derive.rs
@@ -0,0 +1,7 @@
+//! # Example: git-like CLI (Derive API)
+//!
+//! ```rust
+#![doc = include_str!("../../examples/git-derive.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/git-derive.md")]
diff --git a/vendor/clap/src/_cookbook/mod.rs b/vendor/clap/src/_cookbook/mod.rs
new file mode 100644
index 000000000..1a78ed11b
--- /dev/null
+++ b/vendor/clap/src/_cookbook/mod.rs
@@ -0,0 +1,55 @@
+// Contributing
+//
+// New examples:
+// - Building: They must be added to `Cargo.toml` with the appropriate `required-features`.
+// - Testing: Ensure there is a markdown file with [trycmd](https://docs.rs/trycmd) syntax
+// - Link the `.md` file from here
+
+//! # Documentation: Cookbook
+//!
+//! Typed arguments: [derive][typed_derive]
+//! - Topics:
+//! - Custom `parse()`
+//!
+//! Custom cargo command: [builder][cargo_example], [derive][cargo_example_derive]
+//! - Topics:
+//! - Subcommands
+//! - Cargo plugins
+//!
+//! git-like interface: [builder][git], [derive][git_derive]
+//! - Topics:
+//! - Subcommands
+//! - External subcommands
+//! - Optional subcommands
+//! - Default subcommands
+//!
+//! pacman-like interface: [builder][pacman]
+//! - Topics:
+//! - Flag subcommands
+//! - Conflicting arguments
+//!
+//! Escaped positionals with `--`: [builder][escaped_positional], [derive][escaped_positional_derive]
+//!
+//! Multi-call
+//! - busybox: [builder][multicall_busybox]
+//! - Topics:
+//! - Subcommands
+//! - hostname: [builder][multicall_hostname]
+//! - Topics:
+//! - Subcommands
+//!
+//! repl: [builder][repl]
+//! - Topics:
+//! - Read-Eval-Print Loops / Custom command lines
+
+pub mod cargo_example;
+pub mod cargo_example_derive;
+pub mod escaped_positional;
+pub mod escaped_positional_derive;
+pub mod git;
+pub mod git_derive;
+pub mod multicall_busybox;
+pub mod multicall_hostname;
+pub mod pacman;
+pub mod repl;
+pub mod typed_derive;
diff --git a/vendor/clap/src/_cookbook/multicall_busybox.rs b/vendor/clap/src/_cookbook/multicall_busybox.rs
new file mode 100644
index 000000000..e3384d682
--- /dev/null
+++ b/vendor/clap/src/_cookbook/multicall_busybox.rs
@@ -0,0 +1,7 @@
+//! # Example: busybox-like CLI (Builder API)
+//!
+//! ```rust
+#![doc = include_str!("../../examples/multicall-busybox.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/multicall-busybox.md")]
diff --git a/vendor/clap/src/_cookbook/multicall_hostname.rs b/vendor/clap/src/_cookbook/multicall_hostname.rs
new file mode 100644
index 000000000..9777654dc
--- /dev/null
+++ b/vendor/clap/src/_cookbook/multicall_hostname.rs
@@ -0,0 +1,7 @@
+//! # Example: hostname-like CLI (Builder API)
+//!
+//! ```rust
+#![doc = include_str!("../../examples/multicall-hostname.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/multicall-hostname.md")]
diff --git a/vendor/clap/src/_cookbook/pacman.rs b/vendor/clap/src/_cookbook/pacman.rs
new file mode 100644
index 000000000..880c58158
--- /dev/null
+++ b/vendor/clap/src/_cookbook/pacman.rs
@@ -0,0 +1,7 @@
+//! # Example: pacman-like CLI (Builder API)
+//!
+//! ```rust
+#![doc = include_str!("../../examples/pacman.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/pacman.md")]
diff --git a/vendor/clap/src/_cookbook/repl.rs b/vendor/clap/src/_cookbook/repl.rs
new file mode 100644
index 000000000..549ec8259
--- /dev/null
+++ b/vendor/clap/src/_cookbook/repl.rs
@@ -0,0 +1,5 @@
+//! # Example: Command REPL (Builder API)
+//!
+//! ```rust
+#![doc = include_str!("../../examples/repl.rs")]
+//! ```
diff --git a/vendor/clap/src/_cookbook/typed_derive.rs b/vendor/clap/src/_cookbook/typed_derive.rs
new file mode 100644
index 000000000..a5fd15ff8
--- /dev/null
+++ b/vendor/clap/src/_cookbook/typed_derive.rs
@@ -0,0 +1,7 @@
+//! # Example: Custom Types (Derive API)
+//!
+//! ```rust
+#![doc = include_str!("../../examples/typed-derive.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/typed-derive.md")]
diff --git a/vendor/clap/src/_derive/_tutorial.rs b/vendor/clap/src/_derive/_tutorial.rs
new file mode 100644
index 000000000..abd57cef8
--- /dev/null
+++ b/vendor/clap/src/_derive/_tutorial.rs
@@ -0,0 +1,205 @@
+// Contributing
+//
+// New example code:
+// - Please update the corresponding section in the derive tutorial
+// - Building: They must be added to `Cargo.toml` with the appropriate `required-features`.
+// - Testing: Ensure there is a markdown file with [trycmd](https://docs.rs/trycmd) syntax
+//
+// See also the general CONTRIBUTING
+
+//! # Documentation: Derive Tutorial
+//!
+//! 1. [Quick Start](#quick-start)
+//! 2. [Configuring the Parser](#configuring-the-parser)
+//! 3. [Adding Arguments](#adding-arguments)
+//! 1. [Positionals](#positionals)
+//! 2. [Options](#options)
+//! 3. [Flags](#flags)
+//! 4. [Subcommands](#subcommands)
+//! 5. [Defaults](#defaults)
+//! 4. Validation
+//! 1. [Enumerated values](#enumerated-values)
+//! 2. [Validated values](#validated-values)
+//! 3. [Argument Relations](#argument-relations)
+//! 4. [Custom Validation](#custom-validation)
+//! 5. [Testing](#testing)
+//!
+//! See also
+//! - [FAQ: When should I use the builder vs derive APIs?][crate::_faq#when-should-i-use-the-builder-vs-derive-apis]
+//! - The [cookbook][crate::_cookbook] for more application-focused examples
+//!
+//! ## Quick Start
+//!
+//! You can create an application declaratively with a `struct` and some
+//! attributes. **This requires enabling the [`derive` feature flag][crate::_features].**
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/01_quick.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/tutorial_derive/01_quick.md")]
+//!
+//! ## Configuring the Parser
+//!
+//! You use derive [`Parser`][crate::Parser] to start building a parser.
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/02_apps.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/tutorial_derive/02_apps.md")]
+//!
+//! You can use `#[clap(author, version, about)]` attribute defaults to fill these fields in from your `Cargo.toml` file.
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/02_crate.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/02_crate.md")]
+//!
+//! You can use attributes to change the application level behavior of clap. Any [`Command`][crate::Command]] builder function can be used as an attribute.
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/02_app_settings.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/02_app_settings.md")]
+//!
+//! ## Adding Arguments
+//!
+//! ### Positionals
+//!
+//! You can have users specify values by their position on the command-line:
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/03_03_positional.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/03_03_positional.md")]
+//!
+//! ### Options
+//!
+//! You can name your arguments with a flag:
+//! - Order doesn't matter
+//! - They can be optional
+//! - Intent is clearer
+//!
+//! The `#[clap(short = 'n')]` and `#[clap(long = "name")]` attributes that define
+//! the flags are [`Arg`][crate::Args] methods that are derived from the field name when no value
+//! is specified (`#[clap(short)]` and `#[clap(long)]`).
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/03_02_option.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/03_02_option.md")]
+//!
+//! ### Flags
+//!
+//! Flags can also be switches that can be on/off. This is enabled via the
+//! `#[clap(action = ArgAction::SetTrue)]` attribute though this is implied when the field is a
+//! `bool`.
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/03_01_flag_bool.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/03_01_flag_bool.md")]
+//!
+//! Or counted with `#[clap(action = clap::ArgAction::Count)]`:
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/03_01_flag_count.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/03_01_flag_count.md")]
+//!
+//! ### Subcommands
+//!
+//! Subcommands are derived with `#[derive(Subcommand)]` and be added via `#[clap(subcommand)]` attribute. Each
+//! instance of a [Subcommand][crate::Subcommand] can have its own version, author(s), Args, and even its own
+//! subcommands.
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/03_04_subcommands.rs")]
+//! ```
+//! We used a struct-variant to define the `add` subcommand.
+//! Alternatively, you can use a struct for your subcommand's arguments:
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/03_04_subcommands_alt.rs")]
+//! ```
+//!
+#![doc = include_str!("../../examples/tutorial_derive/03_04_subcommands.md")]
+//!
+//! ### Defaults
+//!
+//! We've previously showed that arguments can be [`required`][crate::Arg::required] or optional.
+//! When optional, you work with a `Option` and can `unwrap_or`. Alternatively, you can
+//! set `#[clap(default_value_t)]`.
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/03_05_default_values.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/03_05_default_values.md")]
+//!
+//! ## Validation
+//!
+//! ### Enumerated values
+//!
+//! If you have arguments of specific values you want to test for, you can derive
+//! [`ValueEnum`][crate::ValueEnum].
+//!
+//! This allows you specify the valid values for that argument. If the user does not use one of
+//! those specific values, they will receive a graceful exit with error message informing them
+//! of the mistake, and what the possible valid values are
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/04_01_enum.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/04_01_enum.md")]
+//!
+//! ### Validated values
+//!
+//! More generally, you can validate and parse into any data type.
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/04_02_parse.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/04_02_parse.md")]
+//!
+//! A custom parser can be used to improve the error messages or provide additional validation:
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/04_02_validate.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/04_02_validate.md")]
+//!
+//! ### Argument Relations
+//!
+//! You can declare dependencies or conflicts between [`Arg`][crate::Arg]s or even
+//! [`ArgGroup`][crate::ArgGroup]s.
+//!
+//! [`ArgGroup`][crate::ArgGroup]s make it easier to declare relations instead of having to list
+//! each individually, or when you want a rule to apply "any but not all" arguments.
+//!
+//! Perhaps the most common use of [`ArgGroup`][crate::ArgGroup]s is to require one and *only* one
+//! argument to be present out of a given set. Imagine that you had multiple arguments, and you
+//! want one of them to be required, but making all of them required isn't feasible because perhaps
+//! they conflict with each other.
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/04_03_relations.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/04_03_relations.md")]
+//!
+//! ### Custom Validation
+//!
+//! As a last resort, you can create custom errors with the basics of clap's formatting.
+//!
+//! ```rust
+#![doc = include_str!("../../examples/tutorial_derive/04_04_custom.rs")]
+//! ```
+#![doc = include_str!("../../examples/tutorial_derive/04_04_custom.md")]
+//!
+//! ## Testing
+//!
+//! clap reports most development errors as `debug_assert!`s. Rather than checking every
+//! subcommand, you should have a test that calls
+//! [`Command::debug_assert`][crate::App::debug_assert]:
+//! ```rust,no_run
+#![doc = include_str!("../../examples/tutorial_derive/05_01_assert.rs")]
+//! ```
diff --git a/vendor/clap/src/_derive/mod.rs b/vendor/clap/src/_derive/mod.rs
new file mode 100644
index 000000000..fc9f35db5
--- /dev/null
+++ b/vendor/clap/src/_derive/mod.rs
@@ -0,0 +1,510 @@
+//! # Documentation: Derive Reference
+//!
+//! 1. [Overview](#overview)
+//! 2. [Attributes](#attributes)
+//! 1. [Terminology](#terminology)
+//! 2. [Command Attributes](#command-attributes)
+//! 3. [Arg Attributes](#arg-attributes)
+//! 4. [ValueEnum Attributes](#valueenum-attributes)
+//! 5. [Possible Value Attributes](#possible-value-attributes)
+//! 3. [Arg Types](#arg-types)
+//! 4. [Doc Comments](#doc-comments)
+//! 5. [Mixing Builder and Derive APIs](#mixing-builder-and-derive-apis)
+//! 6. [Tips](#tips)
+//!
+//! ## Overview
+//!
+//! To derive `clap` types, you need to enable the [`derive` feature flag][crate::_features].
+//!
+//! Example:
+//! ```rust
+#![doc = include_str!("../../examples/demo.rs")]
+//! ```
+//!
+//! Let's start by breaking down the anatomy of the derive attributes:
+//! ```rust
+//! use clap::{Parser, Args, Subcommand, ValueEnum};
+//!
+//! /// Doc comment
+//! #[derive(Parser)]
+//! #[clap(APP ATTRIBUTE)]
+//! struct Cli {
+//! /// Doc comment
+//! #[clap(ARG ATTRIBUTE)]
+//! field: UserType,
+//!
+//! #[clap(value_enum, ARG ATTRIBUTE...)]
+//! field: EnumValues,
+//!
+//! #[clap(flatten)]
+//! delegate: Struct,
+//!
+//! #[clap(subcommand)]
+//! command: Command,
+//! }
+//!
+//! /// Doc comment
+//! #[derive(Args)]
+//! #[clap(PARENT APP ATTRIBUTE)]
+//! struct Struct {
+//! /// Doc comment
+//! #[clap(ARG ATTRIBUTE)]
+//! field: UserType,
+//! }
+//!
+//! /// Doc comment
+//! #[derive(Subcommand)]
+//! #[clap(PARENT APP ATTRIBUTE)]
+//! enum Command {
+//! /// Doc comment
+//! #[clap(APP ATTRIBUTE)]
+//! Variant1(Struct),
+//!
+//! /// Doc comment
+//! #[clap(APP ATTRIBUTE)]
+//! Variant2 {
+//! /// Doc comment
+//! #[clap(ARG ATTRIBUTE)]
+//! field: UserType,
+//! }
+//! }
+//!
+//! /// Doc comment
+//! #[derive(ValueEnum)]
+//! #[clap(VALUE ENUM ATTRIBUTE)]
+//! enum EnumValues {
+//! /// Doc comment
+//! #[clap(POSSIBLE VALUE ATTRIBUTE)]
+//! Variant1,
+//! }
+//!
+//! fn main() {
+//! let cli = Cli::parse();
+//! }
+//! ```
+//!
+//! Traits:
+//! - [`Parser`][crate::Parser] parses arguments into a `struct` (arguments) or `enum` (subcommands).
+//! - [`Args`][crate::Args] allows defining a set of re-usable arguments that get merged into their parent container.
+//! - [`Subcommand`][crate::Subcommand] defines available subcommands.
+//! - Subcommand arguments can be defined in a struct-variant or automatically flattened with a tuple-variant.
+//! - [`ValueEnum`][crate::ValueEnum] allows parsing a value directly into an `enum`, erroring on unsupported values.
+//! - The derive doesn't work on enums that contain non-unit variants, unless they are skipped
+//!
+//! *See also the [derive tutorial][crate::_derive::_tutorial] and [cookbook][crate::_cookbook]*
+//!
+//! ## Attributes
+//!
+//! ### Terminology
+//!
+//! **Raw attributes** are forwarded directly to the underlying [`clap` builder][crate::builder]. Any
+//! [`Command`][crate::Command], [`Arg`][crate::Arg], or [`PossibleValue`][crate::PossibleValue] method can be used as an attribute.
+//!
+//! Raw attributes come in two different syntaxes:
+//! ```rust,ignore
+//! #[clap(
+//! global = true, // name = arg form, neat for one-arg methods
+//! required_if_eq("out", "file") // name(arg1, arg2, ...) form.
+//! )]
+//! ```
+//!
+//! - `method = arg` can only be used for methods which take only one argument.
+//! - `method(arg1, arg2)` can be used with any method.
+//!
+//! As long as `method_name` is not one of the magical methods it will be
+//! translated into a mere method call.
+//!
+//! **Magic attributes** have post-processing done to them, whether that is
+//! - Providing of defaults
+//! - Special behavior is triggered off of it
+//!
+//! Magic attributes are more constrained in the syntax they support, usually just
+//! `<attr> = <value>` though some use `<attr>(<value>)` instead. See the specific
+//! magic attributes documentation for details. This allows users to access the
+//! raw behavior of an attribute via `<attr>(<value>)` syntax.
+//!
+//! **NOTE:** Some attributes are inferred from [Arg Types](#arg-types) and [Doc
+//! Comments](#doc-comments). Explicit attributes take precedence over inferred
+//! attributes.
+//!
+//! ### Command Attributes
+//!
+//! These correspond to a [`Command`][crate::Command] which is used for both top-level parsers and
+//! when defining subcommands.
+//!
+//! **Raw attributes:** Any [`Command` method][crate::Command] can also be used as an attribute,
+//! see [Terminology](#terminology) for syntax.
+//! - e.g. `#[clap(arg_required_else_help(true))]` would translate to `cmd.arg_required_else_help(true)`
+//!
+//! **Magic attributes:**
+//! - `name = <expr>`: [`Command::name`][crate::App::name]
+//! - When not present: [crate `name`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-name-field) (if on [`Parser`][crate::Parser] container), variant name (if on [`Subcommand`][crate::Subcommand] variant)
+//! - `version [= <expr>]`: [`Command::version`][crate::App::version]
+//! - When not present: no version set
+//! - Without `<expr>`: defaults to [crate `version`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field)
+//! - `author [= <expr>]`: [`Command::author`][crate::App::author]
+//! - When not present: no author set
+//! - Without `<expr>`: defaults to [crate `authors`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field)
+//! - `about [= <expr>]`: [`Command::about`][crate::App::about]
+//! - When not present: [Doc comment summary](#doc-comments)
+//! - Without `<expr>`: [crate `description`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-description-field) ([`Parser`][crate::Parser] container)
+//! - **TIP:** When a doc comment is also present, you most likely want to add
+//! `#[clap(long_about = None)]` to clear the doc comment so only [`about`][crate::App::about]
+//! gets shown with both `-h` and `--help`.
+//! - `long_about = <expr>`: [`Command::long_about`][crate::App::long_about]
+//! - When not present: [Doc comment](#doc-comments) if there is a blank line, else nothing
+//! - `verbatim_doc_comment`: Minimizes pre-processing when converting doc comments to [`about`][crate::App::about] / [`long_about`][crate::App::long_about]
+//! - `next_display_order`: [`Command::next_display_order`][crate::App::next_display_order]
+//! - `next_help_heading`: [`Command::next_help_heading`][crate::App::next_help_heading]
+//! - When `flatten`ing [`Args`][crate::Args], this is scoped to just the args in this struct and any struct `flatten`ed into it
+//! - `rename_all = <string_literal>`: Override default field / variant name case conversion for [`Command::name`][crate::Command::name] / [`Arg::id`][crate::Arg::id]
+//! - When not present: `"kebab-case"`
+//! - Available values: `"camelCase"`, `"kebab-case"`, `"PascalCase"`, `"SCREAMING_SNAKE_CASE"`, `"snake_case"`, `"lower"`, `"UPPER"`, `"verbatim"`
+//! - `rename_all_env = <string_literal>`: Override default field name case conversion for env variables for [`Arg::env`][crate::Arg::env]
+//! - When not present: `"SCREAMING_SNAKE_CASE"`
+//! - Available values: `"camelCase"`, `"kebab-case"`, `"PascalCase"`, `"SCREAMING_SNAKE_CASE"`, `"snake_case"`, `"lower"`, `"UPPER"`, `"verbatim"`
+//!
+//! And for [`Subcommand`][crate::Subcommand] variants:
+//! - `skip`: Ignore this variant
+//! - `flatten`: Delegates to the variant for more subcommands (must implement
+//! [`Subcommand`][crate::Subcommand])
+//! - `subcommand`: Nest subcommands under the current set of subcommands (must implement
+//! [`Subcommand`][crate::Subcommand])
+//! - `external_subcommand`: [`Command::allow_external_subcommand(true)`][crate::App::allow_external_subcommands]
+//! - Variant must be either `Variant(Vec<String>)` or `Variant(Vec<OsString>)`
+//!
+//! ### Arg Attributes
+//!
+//! These correspond to a [`Arg`][crate::Arg].
+//!
+//! **Raw attributes:** Any [`Arg` method][crate::Arg] can also be used as an attribute, see [Terminology](#terminology) for syntax.
+//! - e.g. `#[clap(max_values(3))]` would translate to `arg.max_values(3)`
+//!
+//! **Magic attributes**:
+//! - `id = <expr>`: [`Arg::id`][crate::Arg::id]
+//! - When not present: case-converted field name is used
+//! - `name = <expr>`: [`Arg::id`][crate::Arg::id]
+//! - **Deprecated:** use `id`
+//! - `value_parser [= <expr>]`: [`Arg::value_parser`][crate::Arg::value_parser]
+//! - When not present: will auto-select an implementation based on the field type using
+//! [`value_parser!][crate::value_parser!]
+//! - When present but defaulted: opt-in to clap v4 semantics
+//! - Env parsing is now dependent on inferred parser
+//! - `PathBuf` will implicitly skip UTF-8 validation (before it required specifying
+//! `try_from_os_str`)
+//! - When present, implies `#[clap(action)]`
+//! - To register a custom type's [`ValueParser`][crate::builder::ValueParser], implement [`ValueParserFactory`][crate::builder::ValueParserFactory]
+//! - `action [= <expr>]`: [`Arg::action`][crate::Arg::action]
+//! - When not present: will auto-select an action based on the field type
+//! - When present but defaulted: opt-in to clap v4 semantics
+//! - When present, implies `#[clap(value_parser)]`
+//! - `args_override_self` is forced on for single flags
+//! - `help = <expr>`: [`Arg::help`][crate::Arg::help]
+//! - When not present: [Doc comment summary](#doc-comments)
+//! - `long_help = <expr>`: [`Arg::long_help`][crate::Arg::long_help]
+//! - When not present: [Doc comment](#doc-comments) if there is a blank line, else nothing
+//! - `verbatim_doc_comment`: Minimizes pre-processing when converting doc comments to [`help`][crate::Arg::help] / [`long_help`][crate::Arg::long_help]
+//! - `short [= <char>]`: [`Arg::short`][crate::Arg::short]
+//! - When not present: no short set
+//! - Without `<char>`: defaults to first character in the case-converted field name
+//! - `long [= <str>]`: [`Arg::long`][crate::Arg::long]
+//! - When not present: no long set
+//! - Without `<str>`: defaults to the case-converted field name
+//! - `env [= <str>]`: [`Arg::env`][crate::Arg::env] (needs [`env` feature][crate::_features] enabled)
+//! - When not present: no env set
+//! - Without `<str>`: defaults to the case-converted field name
+//! - `flatten`: Delegates to the field for more arguments (must implement [`Args`][crate::Args])
+//! - Only [`next_help_heading`][crate::Command::next_help_heading] can be used with `flatten`. See
+//! [clap-rs/clap#3269](https://github.com/clap-rs/clap/issues/3269) for why
+//! arg attributes are not generally supported.
+//! - **Tip:** Though we do apply a flattened [`Args`][crate::Args]'s Parent Command Attributes, this
+//! makes reuse harder. Generally prefer putting the cmd attributes on the
+//! [`Parser`][crate::Parser] or on the flattened field.
+//! - `subcommand`: Delegates definition of subcommands to the field (must implement
+//! [`Subcommand`][crate::Subcommand])
+//! - When `Option<T>`, the subcommand becomes optional
+//! - `from_global`: Read a [`Arg::global`][crate::Arg::global] argument (raw attribute), regardless of what subcommand you are in
+//! - `parse(<kind> [= <function>])`: [`Arg::validator`][crate::Arg::validator] and [`ArgMatches::values_of_t`][crate::ArgMatches::values_of_t]
+//! - **Deprecated:**
+//! - Use `value_parser(...)` for `from_str`, `try_from_str`, `from_os_str`, and `try_from_os_str`
+//! - Use `action(ArgAction::Count` for `from_occurrences`
+//! - Use `action(ArgAction::SetTrue` for `from_flag`
+//! - Default: `try_from_str`
+//! - Warning: for `Path` / `OsString`, be sure to use `try_from_os_str`
+//! - See [Arg Types](#arg-types) for more details
+//! - `value_enum`: Parse the value using the [`ValueEnum`][crate::ValueEnum]
+//! - `skip [= <expr>]`: Ignore this field, filling in with `<expr>`
+//! - Without `<expr>`: fills the field with `Default::default()`
+//! - `default_value = <str>`: [`Arg::default_value`][crate::Arg::default_value] and [`Arg::required(false)`][crate::Arg::required]
+//! - `default_value_t [= <expr>]`: [`Arg::default_value`][crate::Arg::default_value] and [`Arg::required(false)`][crate::Arg::required]
+//! - Requires `std::fmt::Display` or `#[clap(value_enum)]`
+//! - Without `<expr>`, relies on `Default::default()`
+//! - `default_values_t = <expr>`: [`Arg::default_values`][crate::Arg::default_values] and [`Arg::required(false)`][crate::Arg::required]
+//! - Requires field arg to be of type `Vec<T>` and `T` to implement `std::fmt::Display` or `#[clap(value_enum)]`
+//! - `<expr>` must implement `IntoIterator<T>`
+//! - `default_value_os_t [= <expr>]`: [`Arg::default_value_os`][crate::Arg::default_value_os] and [`Arg::required(false)`][crate::Arg::required]
+//! - Requires `std::convert::Into<OsString>` or `#[clap(value_enum)]`
+//! - Without `<expr>`, relies on `Default::default()`
+//! - `default_values_os_t = <expr>`: [`Arg::default_values_os`][crate::Arg::default_values_os] and [`Arg::required(false)`][crate::Arg::required]
+//! - Requires field arg to be of type `Vec<T>` and `T` to implement `std::convert::Into<OsString>` or `#[clap(value_enum)]`
+//! - `<expr>` must implement `IntoIterator<T>`
+//!
+//! ### ValueEnum Attributes
+//!
+//! - `rename_all = <string_literal>`: Override default field / variant name case conversion for [`PossibleValue::new`][crate::PossibleValue]
+//! - When not present: `"kebab-case"`
+//! - Available values: `"camelCase"`, `"kebab-case"`, `"PascalCase"`, `"SCREAMING_SNAKE_CASE"`, `"snake_case"`, `"lower"`, `"UPPER"`, `"verbatim"`
+//!
+//! ### Possible Value Attributes
+//!
+//! These correspond to a [`PossibleValue`][crate::PossibleValue].
+//!
+//! **Raw attributes:** Any [`PossibleValue` method][crate::PossibleValue] can also be used as an attribute, see [Terminology](#terminology) for syntax.
+//! - e.g. `#[clap(alias("foo"))]` would translate to `pv.alias("foo")`
+//!
+//! **Magic attributes**:
+//! - `name = <expr>`: [`PossibleValue::new`][crate::PossibleValue::new]
+//! - When not present: case-converted field name is used
+//! - `help = <expr>`: [`PossibleValue::help`][crate::PossibleValue::help]
+//! - When not present: [Doc comment summary](#doc-comments)
+//!
+//! ## Arg Types
+//!
+//! `clap` assumes some intent based on the type used:
+//!
+//! | Type | Effect | Implies |
+//! |---------------------|--------------------------------------|------------------------------------------------------------------|
+//! | `bool` | flag | `#[clap(parse(from_flag))]` |
+//! | `Option<T>` | optional argument | `.takes_value(true).required(false)` |
+//! | `Option<Option<T>>` | optional value for optional argument | `.takes_value(true).required(false).min_values(0).max_values(1)` |
+//! | `T` | required argument | `.takes_value(true).required(!has_default)` |
+//! | `Vec<T>` | `0..` occurrences of argument | `.takes_value(true).required(false).multiple_occurrences(true)` |
+//! | `Option<Vec<T>>` | `0..` occurrences of argument | `.takes_value(true).required(false).multiple_occurrences(true)` |
+//!
+//! Notes:
+//! - For custom type behavior, you can override the implied attributes/settings and/or set additional ones
+//! - For example, see [custom-bool](./custom-bool.md)
+//! - `Option<Vec<T>>` will be `None` instead of `vec![]` if no arguments are provided.
+//! - This gives the user some flexibility in designing their argument, like with `min_values(0)`
+//!
+//! You can then support your custom type with `#[clap(parse(<kind> [= <function>]))]`:
+//!
+//! | `<kind>` | Signature | Default `<function>` |
+//! |--------------------------|---------------------------------------|---------------------------------|
+//! | `from_str` | `fn(&str) -> T` | `::std::convert::From::from` |
+//! | `try_from_str` (default) | `fn(&str) -> Result<T, E>` | `::std::str::FromStr::from_str` |
+//! | `from_os_str` | `fn(&OsStr) -> T` | `::std::convert::From::from` |
+//! | `try_from_os_str` | `fn(&OsStr) -> Result<T, E>` | (no default function) |
+//! | `from_occurrences` | `fn(u64) -> T` | `value as T` |
+//! | `from_flag` | `fn(bool) -> T` | `::std::convert::From::from` |
+//!
+//! Notes:
+//! - `from_os_str`:
+//! - Implies `arg.takes_value(true).allow_invalid_utf8(true)`
+//! - `try_from_os_str`:
+//! - Implies `arg.takes_value(true).allow_invalid_utf8(true)`
+//! - `from_occurrences`:
+//! - Implies `arg.takes_value(false).multiple_occurrences(true)`
+//! - Reads from `clap::ArgMatches::occurrences_of` rather than a `get_one` function
+//! - Note: operations on values, like `default_value`, are unlikely to do what you want
+//! - `from_flag`
+//! - Implies `arg.takes_value(false)`
+//! - Reads from `clap::ArgMatches::is_present` rather than a `get_one` function
+//! - Note: operations on values, like `default_value`, are unlikely to do what you want
+//!
+//! **Warning:**
+//! - To support non-UTF8 paths, you should use `#[clap(value_parser)]` otherwise
+//! `clap` will parse it as a `String` which will fail on some paths.
+//!
+//! ## Doc Comments
+//!
+//! In clap, help messages for the whole binary can be specified
+//! via [`Command::about`][crate::App::about] and [`Command::long_about`][crate::App::long_about] while help messages
+//! for individual arguments can be specified via [`Arg::help`][crate::Arg::help] and [`Arg::long_help`][crate::Arg::long_help].
+//!
+//! `long_*` variants are used when user calls the program with
+//! `--help` and "short" variants are used with `-h` flag.
+//!
+//! ```rust
+//! # use clap::Parser;
+//!
+//! #[derive(Parser)]
+//! #[clap(about = "I am a program and I work, just pass `-h`", long_about = None)]
+//! struct Foo {
+//! #[clap(short, help = "Pass `-h` and you'll see me!")]
+//! bar: String,
+//! }
+//! ```
+//!
+//! For convenience, doc comments can be used instead of raw methods
+//! (this example works exactly like the one above):
+//!
+//! ```rust
+//! # use clap::Parser;
+//!
+//! #[derive(Parser)]
+//! /// I am a program and I work, just pass `-h`
+//! struct Foo {
+//! /// Pass `-h` and you'll see me!
+//! bar: String,
+//! }
+//! ```
+//!
+//! **NOTE:** Attributes have priority over doc comments!
+//!
+//! **Top level doc comments always generate `Command::about/long_about` calls!**
+//! If you really want to use the `Command::about/long_about` methods (you likely don't),
+//! use the `about` / `long_about` attributes to override the calls generated from
+//! the doc comment. To clear `long_about`, you can use
+//! `#[clap(long_about = None)]`.
+//!
+//! **TIP:** Set `#![deny(missing_docs)]` to catch missing `--help` documentation at compile time.
+//!
+//! ### Pre-processing
+//!
+//! ```rust
+//! # use clap::Parser;
+//! #[derive(Parser)]
+//! /// Hi there, I'm Robo!
+//! ///
+//! /// I like beeping, stumbling, eating your electricity,
+//! /// and making records of you singing in a shower.
+//! /// Pay up, or I'll upload it to youtube!
+//! struct Robo {
+//! /// Call my brother SkyNet.
+//! ///
+//! /// I am artificial superintelligence. I won't rest
+//! /// until I'll have destroyed humanity. Enjoy your
+//! /// pathetic existence, you mere mortals.
+//! #[clap(long, action)]
+//! kill_all_humans: bool,
+//! }
+//! ```
+//!
+//! A doc comment consists of three parts:
+//! - Short summary
+//! - A blank line (whitespace only)
+//! - Detailed description, all the rest
+//!
+//! The summary corresponds with `Command::about` / `Arg::help`. When a blank line is
+//! present, the whole doc comment will be passed to `Command::long_about` /
+//! `Arg::long_help`. Or in other words, a doc may result in just a `Command::about` /
+//! `Arg::help` or `Command::about` / `Arg::help` and `Command::long_about` /
+//! `Arg::long_help`
+//!
+//! In addition, when `verbatim_doc_comment` is not present, `clap` applies some preprocessing, including:
+//!
+//! - Strip leading and trailing whitespace from every line, if present.
+//!
+//! - Strip leading and trailing blank lines, if present.
+//!
+//! - Interpret each group of non-empty lines as a word-wrapped paragraph.
+//!
+//! We replace newlines within paragraphs with spaces to allow the output
+//! to be re-wrapped to the terminal width.
+//!
+//! - Strip any excess blank lines so that there is exactly one per paragraph break.
+//!
+//! - If the first paragraph ends in exactly one period,
+//! remove the trailing period (i.e. strip trailing periods but not trailing ellipses).
+//!
+//! Sometimes you don't want this preprocessing to apply, for example the comment contains
+//! some ASCII art or markdown tables, you would need to preserve LFs along with
+//! blank lines and the leading/trailing whitespace. When you pass use the
+//! `verbatim_doc_comment` magic attribute, you preserve
+//! them.
+//!
+//! **Note:** Keep in mind that `verbatim_doc_comment` will *still*
+//! - Remove one leading space from each line, even if this attribute is present,
+//! to allow for a space between `///` and the content.
+//! - Remove leading and trailing blank lines
+//!
+//! ## Mixing Builder and Derive APIs
+//!
+//! The builder and derive APIs do not live in isolation. They can work together, which is
+//! especially helpful if some arguments can be specified at compile-time while others must be
+//! specified at runtime.
+//!
+//! ### Using derived arguments in a builder application
+//!
+//! When using the derive API, you can `#[clap(flatten)]` a struct deriving `Args` into a struct
+//! deriving `Args` or `Parser`. This example shows how you can augment a `Command` instance
+//! created using the builder API with `Args` created using the derive API.
+//!
+//! It uses the [`Args::augment_args`][crate::Args::augment_args] method to add the arguments to
+//! the `Command` instance.
+//!
+//! Crates such as [clap-verbosity-flag](https://github.com/rust-cli/clap-verbosity-flag) provide
+//! structs that implement `Args`. Without the technique shown in this example, it would not be
+//! possible to use such crates with the builder API.
+//!
+//! For example:
+//! ```rust
+#![doc = include_str!("../../examples/derive_ref/augment_args.rs")]
+//! ```
+//!
+//! ### Using derived subcommands in a builder application
+//!
+//! When using the derive API, you can use `#[clap(subcommand)]` inside the struct to add
+//! subcommands. The type of the field is usually an enum that derived `Parser`. However, you can
+//! also add the subcommands in that enum to a `Command` instance created with the builder API.
+//!
+//! It uses the [`Subcommand::augment_subcommands`][crate::Subcommand::augment_subcommands] method
+//! to add the subcommands to the `Command` instance.
+//!
+//! For example:
+//! ```rust
+#![doc = include_str!("../../examples/derive_ref/augment_subcommands.rs")]
+//! ```
+//!
+//! ### Adding hand-implemented subcommands to a derived application
+//!
+//! When using the derive API, you can use `#[clap(subcommand)]` inside the struct to add
+//! subcommands. The type of the field is usually an enum that derived `Parser`. However, you can
+//! also implement the `Subcommand` trait manually on this enum (or any other type) and it can
+//! still be used inside the struct created with the derive API. The implementation of the
+//! `Subcommand` trait will use the builder API to add the subcommands to the `Command` instance
+//! created behind the scenes for you by the derive API.
+//!
+//! Notice how in the previous example we used
+//! [`augment_subcommands`][crate::Subcommand::augment_subcommands] on an enum that derived
+//! `Parser`, whereas now we implement
+//! [`augment_subcommands`][crate::Subcommand::augment_subcommands] ourselves, but the derive API
+//! calls it automatically since we used the `#[clap(subcommand)]` attribute.
+//!
+//! For example:
+//! ```rust
+#![doc = include_str!("../../examples/derive_ref/hand_subcommand.rs")]
+//! ```
+//!
+//! ### Flattening hand-implemented args into a derived application
+//!
+//! When using the derive API, you can use `#[clap(flatten)]` inside the struct to add arguments as
+//! if they were added directly to the containing struct. The type of the field is usually an
+//! struct that derived `Args`. However, you can also implement the `Args` trait manually on this
+//! struct (or any other type) and it can still be used inside the struct created with the derive
+//! API. The implementation of the `Args` trait will use the builder API to add the arguments to
+//! the `Command` instance created behind the scenes for you by the derive API.
+//!
+//! Notice how in the previous example we used [`augment_args`][crate::Args::augment_args] on the
+//! struct that derived `Parser`, whereas now we implement
+//! [`augment_args`][crate::Args::augment_args] ourselves, but the derive API calls it
+//! automatically since we used the `#[clap(flatten)]` attribute.
+//!
+//! For example:
+//! ```rust
+#![doc = include_str!("../../examples/derive_ref/flatten_hand_args.rs")]
+//! ```
+//!
+//! ## Tips
+//!
+//! - To get access to a [`Command`][crate::Command] call
+//! [`CommandFactory::command`][crate::CommandFactory::command] (implemented when deriving
+//! [`Parser`][crate::Parser])
+//! - Proactively check for bad [`Command`][crate::Command] configurations by calling
+//! [`Command::debug_assert`][crate::App::debug_assert] in a test
+//! ([example](../tutorial_derive/05_01_assert.rs))
+
+pub mod _tutorial;
+#[doc(inline)]
+pub use crate::_cookbook;
diff --git a/vendor/clap/src/_faq.rs b/vendor/clap/src/_faq.rs
new file mode 100644
index 000000000..661a7e73d
--- /dev/null
+++ b/vendor/clap/src/_faq.rs
@@ -0,0 +1,95 @@
+//! # Documentation: FAQ
+//!
+//! 1. [Comparisons](#comparisons)
+//! 1. [How does `clap` compare to structopt?](#how-does-clap-compare-to-structopt)
+//! 2. [What are some reasons to use `clap`? (The Pitch)](#what-are-some-reasons-to-use-clap-the-pitch)
+//! 3. [What are some reasons *not* to use `clap`? (The Anti Pitch)](#what-are-some-reasons-not-to-use-clap-the-anti-pitch)
+//! 4. [Reasons to use `clap`](#reasons-to-use-clap)
+//! 2. [How many approaches are there to create a parser?](#how-many-approaches-are-there-to-create-a-parser)
+//! 3. [When should I use the builder vs derive APIs?](#when-should-i-use-the-builder-vs-derive-apis)
+//! 4. [Why is there a default subcommand of help?](#why-is-there-a-default-subcommand-of-help)
+//!
+//! ### Comparisons
+//!
+//! First, let me say that these comparisons are highly subjective, and not meant
+//! in a critical or harsh manner. All the argument parsing libraries out there (to
+//! include `clap`) have their own strengths and weaknesses. Sometimes it just
+//! comes down to personal taste when all other factors are equal. When in doubt,
+//! try them all and pick one that you enjoy :) There's plenty of room in the Rust
+//! community for multiple implementations!
+//!
+//! For less detailed but more broad comparisons, see
+//! [argparse-benchmarks](https://github.com/rust-cli/argparse-benchmarks-rs).
+//!
+//! #### How does `clap` compare to [structopt](https://github.com/TeXitoi/structopt)?
+//!
+//! Simple! `clap` *is* `structopt`. `structopt` started as a derive API built on
+//! top of clap v2. With clap v3, we've forked structopt and integrated it
+//! directly into clap. structopt is in
+//! [maintenance mode](https://github.com/TeXitoi/structopt/issues/516#issuecomment-989566094)
+//! with the release of `clap_derive`.
+//!
+//! The benefits of integrating `structopt` and `clap` are:
+//! - Easier cross-linking in documentation
+//! - [Documentation parity](../examples)
+//! - Tighter design feedback loop, ensuring all new features are designed with
+//! derives in mind and easier to change `clap` in response to `structopt` bugs.
+//! - Clearer endorsement of `structopt`
+//!
+//! See also
+//! - [`clap` v3 CHANGELOG](../CHANGELOG.md#300---2021-12-31)
+//! - [`structopt` migration guide](../CHANGELOG.md#migrate-structopt)
+//!
+//! #### What are some reasons to use `clap`? (The Pitch)
+//!
+//! `clap` is as fast, and as lightweight as possible while still giving all the features you'd expect from a modern argument parser. In fact, for the amount and type of features `clap` offers it remains about as fast as `getopts`. If you use `clap` when just need some simple arguments parsed, you'll find it's a walk in the park. `clap` also makes it possible to represent extremely complex, and advanced requirements, without too much thought. `clap` aims to be intuitive, easy to use, and fully capable for wide variety use cases and needs.
+//!
+//! #### What are some reasons *not* to use `clap`? (The Anti Pitch)
+//!
+//! Depending on the style in which you choose to define the valid arguments, `clap` can be very verbose. `clap` also offers so many finetuning knobs and dials, that learning everything can seem overwhelming. I strive to keep the simple cases simple, but when turning all those custom dials it can get complex. `clap` is also opinionated about parsing. Even though so much can be tweaked and tuned with `clap` (and I'm adding more all the time), there are still certain features which `clap` implements in specific ways which may be contrary to some users use-cases.
+//!
+//! #### Reasons to use `clap`
+//!
+//! * You want all the nice CLI features your users may expect, yet you don't want to implement them all yourself. You'd like to focus your application, not argument parsing.
+//! * In addition to the point above; you don't want to sacrifice performance to get all those nice features
+//! * You have complex requirements/conflicts between your various valid args.
+//! * You want to use subcommands (although other libraries also support subcommands, they are not nearly as feature rich as those provided by `clap`)
+//! * You want some sort of custom validation built into the argument parsing process, instead of as part of your application (which allows for earlier failures, better error messages, more cohesive experience, etc.)
+//!
+//! ### How many approaches are there to create a parser?
+//!
+//! The following APIs are supported:
+//! - [Derive][crate::_derive::_tutorial]
+//! - [Builder][crate::_tutorial]
+//!
+//! Previously, we supported:
+//! - [YAML](https://github.com/clap-rs/clap/issues/3087)
+//! - [docopt](http://docopt.org/)-inspired [usage parser](https://github.com/clap-rs/clap/issues/3086)
+//! - [`clap_app!`](https://github.com/clap-rs/clap/issues/2835)
+//!
+//! There are also experiments with other APIs:
+//! - [fncmd](https://github.com/yuhr/fncmd): function attribute
+//! - [clap-serde](https://github.com/aobatact/clap-serde): create an `Command` from a deserializer
+//!
+//! ### When should I use the builder vs derive APIs?
+//!
+//! Our default answer is to use the [Derive API][crate::_derive::_tutorial]:
+//! - Easier to read, write, and modify
+//! - Easier to keep the argument declaration and reading of argument in sync
+//! - Easier to reuse, e.g. [clap-verbosity-flag](https://crates.io/crates/clap-verbosity-flag)
+//!
+//! The [Builder API][crate::_tutorial] is a lower-level API that someone might want to use for
+//! - Faster compile times if you aren't already using other procedural macros
+//! - More flexibility, e.g. you can look up an [arguments values][crate::ArgMatches::get_many],
+//! their [ordering with other arguments][crate::ArgMatches::indices_of], and [what set
+//! them][crate::ArgMatches::value_source]. The Derive API can only report values and not
+//! indices of or other data.
+//!
+//! You can [interop between Derive and Builder APIs][crate::_derive#mixing-builder-and-derive-apis].
+//!
+//! ### Why is there a default subcommand of help?
+//!
+//! There is only a default subcommand of `help` when other subcommands have been defined manually. So it's opt-in(ish), being that you only get a `help` subcommand if you're actually using subcommands.
+//!
+//! Also, if the user defined a `help` subcommand themselves, the auto-generated one wouldn't be added (meaning it's only generated if the user hasn't defined one themselves).
+//!
diff --git a/vendor/clap/src/_features.rs b/vendor/clap/src/_features.rs
new file mode 100644
index 000000000..923134c45
--- /dev/null
+++ b/vendor/clap/src/_features.rs
@@ -0,0 +1,27 @@
+//! ## Documentation: Feature Flags
+//!
+//! Available [compile-time feature flags](https://doc.rust-lang.org/cargo/reference/features.html#dependency-features)
+//!
+//! #### Default Features
+//!
+//! * **std**: _Not Currently Used._ Placeholder for supporting `no_std` environments in a backwards compatible manner.
+//! * **color**: Turns on colored error messages.
+//! * **suggestions**: Turns on the `Did you mean '--myoption'?` feature for when users make typos.
+//!
+//! #### Optional features
+//!
+//! * **deprecated**: Guided experience to prepare for next breaking release (at different stages of development, this may become default)
+//! * **derive**: Enables the custom derive (i.e. `#[derive(Parser)]`). Without this you must use one of the other methods of creating a `clap` CLI listed above.
+//! * **cargo**: Turns on macros that read values from [`CARGO_*` environment variables](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates).
+//! * **env**: Turns on the usage of environment variables during parsing.
+//! * **regex**: Enables regex validators.
+//! * **unicode**: Turns on support for unicode characters (including emoji) in arguments and help messages.
+//! * **wrap_help**: Turns on the help text wrapping feature, based on the terminal size.
+//!
+//! #### Experimental features
+//!
+//! **Warning:** These may contain breaking changes between minor releases.
+//!
+//! * **unstable-replace**: Enable [`Command::replace`](https://github.com/clap-rs/clap/issues/2836)
+//! * **unstable-grouped**: Enable [`ArgMatches::grouped_values_of`](https://github.com/clap-rs/clap/issues/2924)
+//! * **unstable-v4**: Preview features which will be stable on the v4.0 release
diff --git a/vendor/clap/src/_tutorial.rs b/vendor/clap/src/_tutorial.rs
new file mode 100644
index 000000000..9dbfc6864
--- /dev/null
+++ b/vendor/clap/src/_tutorial.rs
@@ -0,0 +1,204 @@
+// Contributing
+//
+// New example code:
+// - Please update the corresponding section in the derive tutorial
+// - Building: They must be added to `Cargo.toml` with the appropriate `required-features`.
+// - Testing: Ensure there is a markdown file with [trycmd](https://docs.rs/trycmd) syntax
+//
+// See also the general CONTRIBUTING
+
+//! # Documentation: Builder Tutorial
+//!
+//! 1. [Quick Start](#quick-start)
+//! 2. [Configuring the Parser](#configuring-the-parser)
+//! 3. [Adding Arguments](#adding-arguments)
+//! 1. [Positionals](#positionals)
+//! 2. [Options](#options)
+//! 3. [Flags](#flags)
+//! 4. [Subcommands](#subcommands)
+//! 5. [Defaults](#defaults)
+//! 4. Validation
+//! 1. [Enumerated values](#enumerated-values)
+//! 2. [Validated values](#validated-values)
+//! 3. [Argument Relations](#argument-relations)
+//! 4. [Custom Validation](#custom-validation)
+//! 5. [Testing](#testing)
+//!
+//! See also
+//! - [FAQ: When should I use the builder vs derive APIs?][crate::_faq#when-should-i-use-the-builder-vs-derive-apis]
+//! - The [cookbook][crate::_cookbook] for more application-focused examples
+//!
+//! ## Quick Start
+//!
+//! You can create an application with several arguments using usage strings.
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/01_quick.rs")]
+//! ```
+//!
+#![doc = include_str!("../examples/tutorial_builder/01_quick.md")]
+//!
+//! ## Configuring the Parser
+//!
+//! You use [`Command`][crate::Command] to start building a parser.
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/02_apps.rs")]
+//! ```
+//!
+#![doc = include_str!("../examples/tutorial_builder/02_apps.md")]
+//!
+//! You can use [`command!()`][crate::command!] to fill these fields in from your `Cargo.toml`
+//! file. **This requires the [`cargo` feature flag][crate::_features].**
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/02_crate.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/02_crate.md")]
+//!
+//! You can use [`Command`][crate::Command] methods to change the application level behavior of
+//! clap.
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/02_app_settings.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/02_app_settings.md")]
+//!
+//! ## Adding Arguments
+//!
+//! ### Positionals
+//!
+//! You can have users specify values by their position on the command-line:
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/03_03_positional.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/03_03_positional.md")]
+//!
+//! ### Options
+//!
+//! You can name your arguments with a flag:
+//! - Order doesn't matter
+//! - They can be optional
+//! - Intent is clearer
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/03_02_option.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/03_02_option.md")]
+//!
+//! ### Flags
+//!
+//! Flags can also be switches that can be on/off:
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/03_01_flag_bool.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/03_01_flag_bool.md")]
+//!
+//! Or counted.
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/03_01_flag_count.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/03_01_flag_count.md")]
+//!
+//! ### Subcommands
+//!
+//! Subcommands are defined as [`Command`][crate::Command]s that get added via
+//! [`Command::subcommand`][crate::Command::subcommand]. Each instance of a Subcommand can have its
+//! own version, author(s), Args, and even its own subcommands.
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/03_04_subcommands.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/03_04_subcommands.md")]
+//!
+//! ### Defaults
+//!
+//! We've previously showed that arguments can be [`required`][crate::Arg::required] or optional.
+//! When optional, you work with a `Option` and can `unwrap_or`. Alternatively, you can set
+//! [`Arg::default_value`][crate::Arg::default_value].
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/03_05_default_values.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/03_05_default_values.md")]
+//!
+//! ## Validation
+//!
+//! ### Enumerated values
+//!
+//! If you have arguments of specific values you want to test for, you can use the
+//! [`PossibleValuesParser`][crate::builder::PossibleValuesParser] or [`Arg::value_parser(["val1",
+//! ...])`][crate::Arg::value_parser] for short.
+//!
+//! This allows you specify the valid values for that argument. If the user does not use one of
+//! those specific values, they will receive a graceful exit with error message informing them
+//! of the mistake, and what the possible valid values are
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/04_01_possible.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/04_01_possible.md")]
+//!
+//! When enabling the [`derive` feature][crate::_features], you can use
+//! [`ValueEnum`][crate::ValueEnum] to take care of the boiler plate for you, giving the same
+//! results.
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/04_01_enum.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/04_01_enum.md")]
+//!
+//! ### Validated values
+//!
+//! More generally, you can validate and parse into any data type.
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/04_02_parse.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/04_02_parse.md")]
+//!
+//! A custom parser can be used to improve the error messages or provide additional validation:
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/04_02_validate.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/04_02_validate.md")]
+//!
+//! ### Argument Relations
+//!
+//! You can declare dependencies or conflicts between [`Arg`][crate::Arg]s or even
+//! [`ArgGroup`][crate::ArgGroup]s.
+//!
+//! [`ArgGroup`][crate::ArgGroup]s make it easier to declare relations instead of having to list
+//! each individually, or when you want a rule to apply "any but not all" arguments.
+//!
+//! Perhaps the most common use of [`ArgGroup`][crate::ArgGroup]s is to require one and *only* one
+//! argument to be present out of a given set. Imagine that you had multiple arguments, and you
+//! want one of them to be required, but making all of them required isn't feasible because perhaps
+//! they conflict with each other.
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/04_03_relations.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/04_03_relations.md")]
+//!
+//! ### Custom Validation
+//!
+//! As a last resort, you can create custom errors with the basics of clap's formatting.
+//!
+//! ```rust
+#![doc = include_str!("../examples/tutorial_builder/04_04_custom.rs")]
+//! ```
+#![doc = include_str!("../examples/tutorial_builder/04_04_custom.md")]
+//!
+//! ## Testing
+//!
+//! clap reports most development errors as `debug_assert!`s. Rather than checking every
+//! subcommand, you should have a test that calls
+//! [`Command::debug_assert`][crate::App::debug_assert]:
+//! ```rust,no_run
+#![doc = include_str!("../examples/tutorial_builder/05_01_assert.rs")]
+//! ```
diff --git a/vendor/clap/src/builder/action.rs b/vendor/clap/src/builder/action.rs
index ab3314290..71a91a8b1 100644
--- a/vendor/clap/src/builder/action.rs
+++ b/vendor/clap/src/builder/action.rs
@@ -183,16 +183,16 @@ pub enum ArgAction {
/// assert!(matches.contains_id("flag"));
/// assert_eq!(matches.occurrences_of("flag"), 0);
/// assert_eq!(
- /// matches.get_one::<u8>("flag").copied(),
- /// Some(2)
+ /// matches.get_count("flag"),
+ /// 2
/// );
///
/// let matches = cmd.try_get_matches_from(["mycmd"]).unwrap();
/// assert!(matches.contains_id("flag"));
/// assert_eq!(matches.occurrences_of("flag"), 0);
/// assert_eq!(
- /// matches.get_one::<u8>("flag").copied(),
- /// Some(0)
+ /// matches.get_count("flag"),
+ /// 0
/// );
/// ```
Count,
diff --git a/vendor/clap/src/builder/app_settings.rs b/vendor/clap/src/builder/app_settings.rs
index e2d9ba6b1..88bc243c4 100644
--- a/vendor/clap/src/builder/app_settings.rs
+++ b/vendor/clap/src/builder/app_settings.rs
@@ -400,23 +400,20 @@ pub enum AppSettings {
)]
NoAutoVersion,
- /// Deprecated, replaced with [`AppSettings::AllowHyphenValues`]
+ /// Deprecated, replaced with [`Command::allow_hyphen_values`]
#[cfg_attr(
feature = "deprecated",
- deprecated(
- since = "3.0.0",
- note = "Replaced with `AppSettings::AllowHyphenValues`"
- )
+ deprecated(since = "3.0.0", note = "Replaced with `Command::allow_hyphen_values`")
)]
#[doc(hidden)]
AllowLeadingHyphen,
- /// Deprecated, this is now the default, see [`AppSettings::AllowInvalidUtf8ForExternalSubcommands`] and [`ArgSettings::AllowInvalidUtf8`][crate::ArgSettings::AllowInvalidUtf8] for the opposite.
+ /// Deprecated, replaced with [`Command::allow_invalid_utf8_for_external_subcommands`] and [`Command::is_allow_invalid_utf8_for_external_subcommands_set`]
#[cfg_attr(
feature = "deprecated",
deprecated(
since = "3.0.0",
- note = "This is now the default see `AppSettings::AllowInvalidUtf8ForExternalSubcommands` and `ArgSettings::AllowInvalidUtf8` for the opposite."
+ note = "Replaced with `Command::allow_invalid_utf8_for_external_subcommands` and `Command::is_allow_invalid_utf8_for_external_subcommands_set`"
)
)]
#[doc(hidden)]
@@ -462,42 +459,47 @@ pub enum AppSettings {
#[doc(hidden)]
ColorNever,
- /// Deprecated, replaced with [`AppSettings::DisableHelpFlag`]
+ /// Deprecated, replaced with [`Command::disable_help_flag`] and [`Command::is_disable_help_flag_set`]
#[cfg_attr(
feature = "deprecated",
- deprecated(since = "3.0.0", note = "Replaced with `AppSettings::DisableHelpFlag`")
+ deprecated(
+ since = "3.0.0",
+ note = "Replaced with `Command::disable_help_flag` and `Command::is_disable_help_flag_set`"
+ )
)]
#[doc(hidden)]
DisableHelpFlags,
- /// Deprecated, replaced with [`AppSettings::DisableVersionFlag`]
+ /// Deprecated, replaced with [`Command::disable_version_flag`] and
+ /// [`Command::is_disable_version_flag_set`]
#[cfg_attr(
feature = "deprecated",
deprecated(
since = "3.0.0",
- note = "Replaced with `AppSettings::DisableVersionFlag`"
+ note = "Replaced with `Command::disable_version_flag` and `Command::is_disable_version_flag_set`"
)
)]
#[doc(hidden)]
DisableVersion,
- /// Deprecated, replaced with [`AppSettings::PropagateVersion`]
+ /// Deprecated, replaced with [`Command::propagate_version`] and [`Command::is_propagate_version_set`]
#[cfg_attr(
feature = "deprecated",
deprecated(
since = "3.0.0",
- note = "Replaced with `AppSettings::PropagateVersion`"
+ note = "Replaced with `Command::propagate_version` and `Command::is_propagate_version_set`"
)
)]
#[doc(hidden)]
GlobalVersion,
- /// Deprecated, replaced with [`AppSettings::HidePossibleValues`]
+ /// Deprecated, replaced with [`Command::hide_possible_values`] and
+ /// [`Arg::is_hide_possible_values_set`]
#[cfg_attr(
feature = "deprecated",
deprecated(
since = "3.0.0",
- note = "Replaced with AppSettings::HidePossibleValues"
+ note = "Replaced with `Command::hide_possible_values` and `Arg::is_hide_possible_values_set`"
)
)]
#[doc(hidden)]
diff --git a/vendor/clap/src/builder/arg.rs b/vendor/clap/src/builder/arg.rs
index 63e88e80e..e9403d0b7 100644
--- a/vendor/clap/src/builder/arg.rs
+++ b/vendor/clap/src/builder/arg.rs
@@ -4316,6 +4316,16 @@ impl<'help> Arg<'help> {
}
}
+ /// Get *all* short aliases for this argument, if any, both visible and hidden.
+ #[inline]
+ pub fn get_all_short_aliases(&self) -> Option<Vec<char>> {
+ if self.short_aliases.is_empty() {
+ None
+ } else {
+ Some(self.short_aliases.iter().map(|(s, _)| s).copied().collect())
+ }
+ }
+
/// Get the short option name and its visible aliases, if any
#[inline]
pub fn get_short_and_visible_aliases(&self) -> Option<Vec<char>> {
@@ -4351,6 +4361,16 @@ impl<'help> Arg<'help> {
}
}
+ /// Get *all* aliases for this argument, if any, both visible and hidden.
+ #[inline]
+ pub fn get_all_aliases(&self) -> Option<Vec<&'help str>> {
+ if self.aliases.is_empty() {
+ None
+ } else {
+ Some(self.aliases.iter().map(|(s, _)| s).copied().collect())
+ }
+ }
+
/// Get the long option name and its visible aliases, if any
#[inline]
pub fn get_long_and_visible_aliases(&self) -> Option<Vec<&'help str>> {
diff --git a/vendor/clap/src/builder/arg_settings.rs b/vendor/clap/src/builder/arg_settings.rs
index 3b7faf7bf..ecc064caa 100644
--- a/vendor/clap/src/builder/arg_settings.rs
+++ b/vendor/clap/src/builder/arg_settings.rs
@@ -50,14 +50,10 @@ pub enum ArgSettings {
)
)]
MultipleValues,
- /// Deprecated, replaced with [`Arg::multiple_occurrences`] and
- /// [`Arg::is_multiple_occurrences_set`]
+ /// Deprecated, replaced with [`Arg::action`] ([Issue #3772](https://github.com/clap-rs/clap/issues/3772))
#[cfg_attr(
feature = "deprecated",
- deprecated(
- since = "3.1.0",
- note = "Replaced with `Arg::multiple_occurrences` and `Arg::is_multiple_occurrences_set`"
- )
+ deprecated(since = "3.1.0", note = "Replaced with `Arg::action` (Issue #3772)")
)]
MultipleOccurrences,
/// Deprecated, see [`ArgSettings::MultipleOccurrences`] (most likely what you want) and
@@ -66,18 +62,17 @@ pub enum ArgSettings {
feature = "deprecated",
deprecated(
since = "3.0.0",
- note = "Split into `ArgSettings::MultipleOccurrences` (most likely what you want) and `ArgSettings::MultipleValues`"
+ note = "Split into `Arg::multiple_occurrences` (most likely what you want) and `Arg::multiple_values`"
)
)]
#[doc(hidden)]
Multiple,
- /// Deprecated, replaced with [`Arg::forbid_empty_values`] and
- /// [`Arg::is_forbid_empty_values_set`]
+ /// Deprecated, replaced with [`Arg::value_parser(NonEmptyStringValueParser::new())`]
#[cfg_attr(
feature = "deprecated",
deprecated(
since = "3.1.0",
- note = "Replaced with `Arg::forbid_empty_values` and `Arg::is_forbid_empty_values_set`"
+ note = "Replaced with `Arg::value_parser(NonEmptyStringValueParser::new())`"
)
)]
ForbidEmptyValues,
@@ -157,12 +152,13 @@ pub enum ArgSettings {
)
)]
AllowHyphenValues,
- /// Deprecated, replaced with [`ArgSettings::AllowHyphenValues`]
+ /// Deprecated, replaced with [`Arg::allow_hyphen_values`] and
+ /// [`Arg::is_allow_hyphen_values_set`]
#[cfg_attr(
feature = "deprecated",
deprecated(
since = "3.0.0",
- note = "Replaced with `ArgSettings::AllowHyphenValues`"
+ note = "Replaced with `Arg::allow_hyphen_values` and `Arg::is_allow_hyphen_values_set`"
)
)]
#[doc(hidden)]
@@ -203,10 +199,13 @@ pub enum ArgSettings {
)
)]
IgnoreCase,
- /// Deprecated, replaced with [`ArgSettings::IgnoreCase`]
+ /// Deprecated, replaced with [`Arg::ignore_case`] and [`Arg::is_ignore_case_set`]
#[cfg_attr(
feature = "deprecated",
- deprecated(since = "3.0.0", note = "Replaced with `ArgSettings::IgnoreCase`")
+ deprecated(
+ since = "3.0.0",
+ note = "Replaced with `Arg::ignore_case` and `Arg::is_ignore_case_set`"
+ )
)]
#[doc(hidden)]
CaseInsensitive,
diff --git a/vendor/clap/src/builder/command.rs b/vendor/clap/src/builder/command.rs
index 1fcb64ecc..de59ad8cd 100644
--- a/vendor/clap/src/builder/command.rs
+++ b/vendor/clap/src/builder/command.rs
@@ -274,6 +274,50 @@ impl<'help> App<'help> {
self
}
+ /// Allows one to mutate a [`Command`] after it's been added as a subcommand.
+ ///
+ /// This can be useful for modifying auto-generated arguments of nested subcommands with
+ /// [`Command::mut_arg`].
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// # use clap::Command;
+ ///
+ /// let mut cmd = Command::new("foo")
+ /// .subcommand(Command::new("bar"))
+ /// .mut_subcommand("bar", |subcmd| subcmd.disable_help_flag(true));
+ ///
+ /// let res = cmd.try_get_matches_from_mut(vec!["foo", "bar", "--help"]);
+ ///
+ /// // Since we disabled the help flag on the "bar" subcommand, this should err.
+ ///
+ /// assert!(res.is_err());
+ ///
+ /// let res = cmd.try_get_matches_from_mut(vec!["foo", "bar"]);
+ /// assert!(res.is_ok());
+ /// ```
+ #[must_use]
+ pub fn mut_subcommand<'a, T, F>(mut self, subcmd_id: T, f: F) -> Self
+ where
+ F: FnOnce(App<'help>) -> App<'help>,
+ T: Into<&'a str>,
+ {
+ let subcmd_id: &str = subcmd_id.into();
+ let id = Id::from(subcmd_id);
+
+ let pos = self.subcommands.iter().position(|s| s.id == id);
+
+ let subcmd = if let Some(idx) = pos {
+ self.subcommands.remove(idx)
+ } else {
+ App::new(subcmd_id)
+ };
+
+ self.subcommands.push(f(subcmd));
+ self
+ }
+
/// Adds an [`ArgGroup`] to the application.
///
/// [`ArgGroup`]s are a family of related arguments.
@@ -700,7 +744,7 @@ impl<'help> App<'help> {
/// [`io::stdout()`]: std::io::stdout()
pub fn print_help(&mut self) -> io::Result<()> {
self._build_self();
- let color = self.get_color();
+ let color = self.color_help();
let mut c = Colorizer::new(Stream::Stdout, color);
let usage = Usage::new(self);
@@ -725,7 +769,7 @@ impl<'help> App<'help> {
/// [`--help` (long)]: Arg::long_help()
pub fn print_long_help(&mut self) -> io::Result<()> {
self._build_self();
- let color = self.get_color();
+ let color = self.color_help();
let mut c = Colorizer::new(Stream::Stdout, color);
let usage = Usage::new(self);
@@ -1604,6 +1648,14 @@ impl<'help> App<'help> {
/// strings. After this setting is set, this will be *the only* usage string
/// displayed to the user!
///
+ /// **NOTE:** Multiple usage lines may be present in the usage argument, but
+ /// some rules need to be followed to ensure the usage lines are formatted
+ /// correctly by the default help formatter:
+ ///
+ /// - Do not indent the first usage line.
+ /// - Indent all subsequent usage lines with four spaces.
+ /// - The last line must not end with a newline.
+ ///
/// # Examples
///
/// ```no_run
@@ -1612,6 +1664,20 @@ impl<'help> App<'help> {
/// .override_usage("myapp [-clDas] <some_file>")
/// # ;
/// ```
+ ///
+ /// Or for multiple usage lines:
+ ///
+ /// ```no_run
+ /// # use clap::{Command, Arg};
+ /// Command::new("myprog")
+ /// .override_usage(
+ /// "myapp -X [-a] [-b] <file>\n \
+ /// myapp -Y [-c] <file1> <file2>\n \
+ /// myapp -Z [-d|-e]"
+ /// )
+ /// # ;
+ /// ```
+ ///
/// [`ArgMatches::usage`]: ArgMatches::usage()
#[must_use]
pub fn override_usage<S: Into<&'help str>>(mut self, usage: S) -> Self {
@@ -3512,15 +3578,21 @@ impl<'help> App<'help> {
if arg.is_global_set() {
self.get_global_arg_conflicts_with(arg)
} else {
- arg.blacklist
- .iter()
- .map(|id| {
- self.args.args().find(|arg| arg.id == *id).expect(
- "Command::get_arg_conflicts_with: \
- The passed arg conflicts with an arg unknown to the cmd",
- )
- })
- .collect()
+ let mut result = Vec::new();
+ for id in arg.blacklist.iter() {
+ if let Some(arg) = self.find(id) {
+ result.push(arg);
+ } else if let Some(group) = self.find_group(id) {
+ result.extend(
+ self.unroll_args_in_group(&group.id)
+ .iter()
+ .map(|id| self.find(id).expect(INTERNAL_ERROR_MSG)),
+ );
+ } else {
+ panic!("Command::get_arg_conflicts_with: The passed arg conflicts with an arg unknown to the cmd");
+ }
+ }
+ result
}
}
@@ -4264,7 +4336,8 @@ impl<'help> App<'help> {
use std::fmt::Write;
let mut mid_string = String::from(" ");
- if !self.is_subcommand_negates_reqs_set() {
+ if !self.is_subcommand_negates_reqs_set() && !self.is_args_conflicts_with_subcommands_set()
+ {
let reqs = Usage::new(self).get_required_usage_from(&[], None, true); // maybe Some(m)
for s in &reqs {
@@ -4347,7 +4420,9 @@ impl<'help> App<'help> {
if !self.is_set(AppSettings::BinNameBuilt) {
let mut mid_string = String::from(" ");
- if !self.is_subcommand_negates_reqs_set() {
+ if !self.is_subcommand_negates_reqs_set()
+ && !self.is_args_conflicts_with_subcommands_set()
+ {
let reqs = Usage::new(self).get_required_usage_from(&[], None, true); // maybe Some(m)
for s in &reqs {
@@ -5107,3 +5182,8 @@ where
_ => None,
}
}
+
+#[test]
+fn check_auto_traits() {
+ static_assertions::assert_impl_all!(Command: Send, Sync, Unpin);
+}
diff --git a/vendor/clap/src/builder/value_parser.rs b/vendor/clap/src/builder/value_parser.rs
index 397537c9f..0492f2782 100644
--- a/vendor/clap/src/builder/value_parser.rs
+++ b/vendor/clap/src/builder/value_parser.rs
@@ -12,7 +12,7 @@ use crate::parser::AnyValueId;
/// use within an application.
///
/// See
-/// - [`value_parser!`] for automatically selecting an implementation for a given type
+/// - [`value_parser!`][crate::value_parser] for automatically selecting an implementation for a given type
/// - [`ValueParser::new`] for additional [`TypedValueParser`] that can be used
///
/// # Example
diff --git a/vendor/clap/src/derive.rs b/vendor/clap/src/derive.rs
index bfb7bdfa2..b6ac04df6 100644
--- a/vendor/clap/src/derive.rs
+++ b/vendor/clap/src/derive.rs
@@ -19,11 +19,9 @@ use std::ffi::OsString;
///
/// See also [`Subcommand`] and [`Args`].
///
-/// See the
-/// [derive reference](https://github.com/clap-rs/clap/blob/v3.2.5/examples/derive_ref/README.md)
-/// for attributes and best practices.
+/// See the [derive reference](crate::_derive) for attributes and best practices.
///
-/// **NOTE:** Deriving requires the `derive` feature flag
+/// **NOTE:** Deriving requires the [`derive` feature flag][crate::_features]
///
/// # Examples
///
@@ -156,13 +154,13 @@ pub trait Parser: FromArgMatches + CommandFactory + Sized {
.map_err(format_error::<Self>)
}
- /// Deprecated, `StructOpt::clap` replaced with [`IntoCommand::command`] (derive as part of
+ /// Deprecated, `StructOpt::clap` replaced with [`CommandFactory::command`] (derive as part of
/// [`Parser`])
#[cfg_attr(
feature = "deprecated",
deprecated(
since = "3.0.0",
- note = "`StructOpt::clap` is replaced with `IntoCommand::command` (derived as part of `Parser`)"
+ note = "`StructOpt::clap` is replaced with `CommandFactory::command` (derived as part of `Parser`)"
)
)]
#[doc(hidden)]
@@ -372,11 +370,9 @@ pub trait FromArgMatches: Sized {
/// `Args`.
/// - `Variant(ChildArgs)`: No attribute is used with enum variants that impl `Args`.
///
-/// See the
-/// [derive reference](https://github.com/clap-rs/clap/blob/v3.2.5/examples/derive_ref/README.md)
-/// for attributes and best practices.
+/// See the [derive reference](crate::_derive) for attributes and best practices.
///
-/// **NOTE:** Deriving requires the `derive` feature flag
+/// **NOTE:** Deriving requires the [`derive` feature flag][crate::_features]
///
/// # Example
///
@@ -416,11 +412,9 @@ pub trait Args: FromArgMatches + Sized {
/// - `#[clap(flatten)] Variant(SubCmd)`: Attribute can only be used with enum variants that impl
/// `Subcommand`.
///
-/// See the
-/// [derive reference](https://github.com/clap-rs/clap/blob/v3.2.5/examples/derive_ref/README.md)
-/// for attributes and best practices.
+/// See the [derive reference](crate::_derive) for attributes and best practices.
///
-/// **NOTE:** Deriving requires the `derive` feature flag
+/// **NOTE:** Deriving requires the [`derive` feature flag][crate::_features]
///
/// # Example
///
@@ -460,11 +454,9 @@ pub trait Subcommand: FromArgMatches + Sized {
/// - Call [`Arg::possible_values`][crate::Arg::possible_values]
/// - Allowing using the `#[clap(default_value_t)]` attribute without implementing `Display`.
///
-/// See the
-/// [derive reference](https://github.com/clap-rs/clap/blob/v3.2.5/examples/derive_ref/README.md)
-/// for attributes and best practices.
+/// See the [derive reference](crate::_derive) for attributes and best practices.
///
-/// **NOTE:** Deriving requires the `derive` feature flag
+/// **NOTE:** Deriving requires the [`derive` feature flag][crate::_features]
///
/// # Example
///
diff --git a/vendor/clap/src/error/kind.rs b/vendor/clap/src/error/kind.rs
index 21256609a..4c3dc48b0 100644
--- a/vendor/clap/src/error/kind.rs
+++ b/vendor/clap/src/error/kind.rs
@@ -407,7 +407,7 @@ impl ErrorKind {
Self::UnrecognizedSubcommand => Some("A subcommand wasn't recognized"),
Self::EmptyValue => Some("An argument requires a value but none was supplied"),
Self::NoEquals => Some("Equal is needed when assigning values to one of the arguments"),
- Self::ValueValidation => Some("Invalid for for one of the arguments"),
+ Self::ValueValidation => Some("Invalid value for one of the arguments"),
Self::TooManyValues => Some("An argument received an unexpected value"),
Self::TooFewValues => Some("An argument requires more values"),
Self::TooManyOccurrences => Some("An argument occurred too many times"),
diff --git a/vendor/clap/src/error/mod.rs b/vendor/clap/src/error/mod.rs
index df9a84c56..fbd2b30a8 100644
--- a/vendor/clap/src/error/mod.rs
+++ b/vendor/clap/src/error/mod.rs
@@ -1147,12 +1147,7 @@ impl Display for Backtrace {
}
}
-#[cfg(test)]
-mod tests {
- /// Check `clap::Error` impls Send and Sync.
- mod clap_error_impl_send_sync {
- use crate::Error;
- trait Foo: std::error::Error + Send + Sync + 'static {}
- impl Foo for Error {}
- }
+#[test]
+fn check_auto_traits() {
+ static_assertions::assert_impl_all!(Error: Send, Sync, Unpin);
}
diff --git a/vendor/clap/src/lib.rs b/vendor/clap/src/lib.rs
index d9a97715f..5cefe6ec1 100644
--- a/vendor/clap/src/lib.rs
+++ b/vendor/clap/src/lib.rs
@@ -3,10 +3,79 @@
// (see LICENSE or <http://opensource.org/licenses/MIT>) All files in the project carrying such
// notice may not be copied, modified, or distributed except according to those terms.
+//! > **Command Line Argument Parser for Rust**
+//!
+//! Quick Links:
+//! - Derive [tutorial][_derive::_tutorial] and [reference][_derive]
+//! - Builder [tutorial][_tutorial] and [reference](index.html)
+//! - [Cookbook][_cookbook]
+//! - [FAQ][_faq]
+//! - [Discussions](https://github.com/clap-rs/clap/discussions)
+//!
+//! ## Aspirations
+//!
+//! - Out of the box, users get a polished CLI experience
+//! - Including common argument behavior, help generation, suggested fixes for users, colored output, [shell completions](https://github.com/clap-rs/clap/tree/master/clap_complete), etc
+//! - Flexible enough to port your existing CLI interface
+//! - However, we won't necessarily streamline support for each use case
+//! - Reasonable parse performance
+//! - Resilient maintainership, including
+//! - Willing to break compatibility rather than batching up breaking changes in large releases
+//! - Leverage feature flags to keep to one active branch
+//! - Being under [WG-CLI](https://github.com/rust-cli/team/) to increase the bus factor
+//! - We follow semver and will wait about 6-9 months between major breaking changes
+//! - We will support the last two minor Rust releases (MSRV, currently 1.56.1)
+//!
+//! While these aspirations can be at odds with fast build times and low binary
+//! size, we will still strive to keep these reasonable for the flexibility you
+//! get. Check out the
+//! [argparse-benchmarks](https://github.com/rust-cli/argparse-benchmarks-rs) for
+//! CLI parsers optimized for other use cases.
+//!
+//! ## Example
+//!
+//! Run
+//! ```console
+//! $ cargo add clap --features derive
+//! ```
+//! *(See also [feature flag reference][_features])*
+//!
+//! Then define your CLI in `main.rs`:
+#![cfg_attr(not(feature = "derive"), doc = " ```ignore")]
+#![cfg_attr(feature = "derive", doc = " ```no_run")]
+#![doc = include_str!("../examples/demo.rs")]
+//! ```
+//!
+//! And try it out:
+#![doc = include_str!("../examples/demo.md")]
+//!
+//! See also the derive [tutorial][_derive::_tutorial] and [reference][_derive]
+//!
+//! ### Related Projects
+//!
+//! Augment clap:
+//! - [wild](https://crates.io/crates/wild) for supporting wildcards (`*`) on Windows like you do Linux
+//! - [argfile](https://crates.io/crates/argfile) for loading additional arguments from a file (aka response files)
+//! - [shadow-rs](https://crates.io/crates/shadow-rs) for generating `Command::long_version`
+//! - [clap_mangen](https://crates.io/crates/clap_mangen) for generating man page source (roff)
+//! - [clap_complete](https://crates.io/crates/clap_complete) for shell completion support
+//!
+//! CLI Helpers
+//! - [clap-verbosity-flag](https://crates.io/crates/clap-verbosity-flag)
+//! - [clap-cargo](https://crates.io/crates/clap-cargo)
+//! - [concolor-clap](https://crates.io/crates/concolor-clap)
+//!
+//! Testing
+//! - [`trycmd`](https://crates.io/crates/trycmd): Bulk snapshot testing
+//! - [`snapbox`](https://crates.io/crates/snapbox): Specialized snapshot testing
+//! - [`assert_cmd`](https://crates.io/crates/assert_cmd) and [`assert_fs`](https://crates.io/crates/assert_fs): Customized testing
+//!
+//! Documentation:
+//! - [Command-line Apps for Rust](https://rust-cli.github.io/book/index.html) book
+//!
+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(html_logo_url = "https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png")]
-#![cfg_attr(feature = "derive", doc = include_str!("../README.md"))]
-//! <https://github.com/clap-rs/clap>
#![warn(
missing_docs,
missing_debug_implementations,
@@ -82,9 +151,23 @@ pub use Parser as StructOpt;
)]
pub use ValueEnum as ArgEnum;
-#[cfg(any(feature = "derive", feature = "cargo"))]
+#[cfg(feature = "unstable-doc")]
+pub mod _cookbook;
+#[cfg(feature = "unstable-doc")]
+pub mod _derive;
+#[cfg(feature = "unstable-doc")]
+pub mod _faq;
+#[cfg(feature = "unstable-doc")]
+pub mod _features;
+#[cfg(feature = "unstable-doc")]
+pub mod _tutorial;
+
#[doc(hidden)]
-pub use once_cell;
+pub mod __macro_refs {
+ #[cfg(any(feature = "derive", feature = "cargo"))]
+ #[doc(hidden)]
+ pub use once_cell;
+}
#[macro_use]
#[allow(missing_docs)]
diff --git a/vendor/clap/src/macros.rs b/vendor/clap/src/macros.rs
index 0b671a37a..1f9167408 100644
--- a/vendor/clap/src/macros.rs
+++ b/vendor/clap/src/macros.rs
@@ -20,7 +20,7 @@ macro_rules! load_yaml {
#[macro_export]
#[cfg_attr(
feature = "deprecated",
- deprecated(since = "3.0.0", note = "Replaced with `ArgMatches::value_of_t`")
+ deprecated(since = "3.0.0", note = "Replaced with `ArgMatches::get_one`")
)]
#[doc(hidden)]
macro_rules! value_t {
@@ -36,10 +36,7 @@ macro_rules! value_t {
#[macro_export]
#[cfg_attr(
feature = "deprecated",
- deprecated(
- since = "3.0.0",
- note = "Replaced with `ArgMatches::value_of_t_or_exit`"
- )
+ deprecated(since = "3.0.0", note = "Replaced with `ArgMatches::get_one`")
)]
#[doc(hidden)]
macro_rules! value_t_or_exit {
@@ -55,7 +52,7 @@ macro_rules! value_t_or_exit {
#[macro_export]
#[cfg_attr(
feature = "deprecated",
- deprecated(since = "3.0.0", note = "Replaced with `ArgMatches::values_of_t`")
+ deprecated(since = "3.0.0", note = "Replaced with `ArgMatches::get_many`")
)]
#[doc(hidden)]
macro_rules! values_t {
@@ -71,10 +68,7 @@ macro_rules! values_t {
#[macro_export]
#[cfg_attr(
feature = "deprecated",
- deprecated(
- since = "3.0.0",
- note = "Replaced with `ArgMatches::values_of_t_or_exit`"
- )
+ deprecated(since = "3.0.0", note = "Replaced with `ArgMatches::get_many`")
)]
#[doc(hidden)]
macro_rules! values_t_or_exit {
@@ -88,7 +82,7 @@ macro_rules! values_t_or_exit {
#[cfg_attr(
feature = "deprecated",
- deprecated(since = "3.0.0", note = "Replaced with `ArgEnum`")
+ deprecated(since = "3.0.0", note = "Replaced with `ValueEnum`")
)]
#[doc(hidden)]
#[macro_export]
@@ -101,7 +95,7 @@ macro_rules! _clap_count_exprs {
/// Deprecated, replaced with [`ArgEnum`][crate::ArgEnum]
#[cfg_attr(
feature = "deprecated",
- deprecated(since = "3.0.0", note = "Replaced with `ArgEnum`")
+ deprecated(since = "3.0.0", note = "Replaced with `ValueEnum`")
)]
#[doc(hidden)]
#[macro_export]
@@ -256,8 +250,10 @@ macro_rules! crate_version {
#[macro_export]
macro_rules! crate_authors {
($sep:expr) => {{
- static CACHED: clap::once_cell::sync::Lazy<String> =
- clap::once_cell::sync::Lazy::new(|| env!("CARGO_PKG_AUTHORS").replace(':', $sep));
+ static CACHED: clap::__macro_refs::once_cell::sync::Lazy<String> =
+ clap::__macro_refs::once_cell::sync::Lazy::new(|| {
+ env!("CARGO_PKG_AUTHORS").replace(':', $sep)
+ });
let s: &'static str = &*CACHED;
s
diff --git a/vendor/clap/src/output/usage.rs b/vendor/clap/src/output/usage.rs
index 7adaf58c6..6f7a2cad4 100644
--- a/vendor/clap/src/output/usage.rs
+++ b/vendor/clap/src/output/usage.rs
@@ -382,73 +382,64 @@ impl<'help, 'cmd> Usage<'help, 'cmd> {
unrolled_reqs
);
- let args_in_groups = self
- .cmd
- .get_groups()
- .filter(|gn| required.contains(&gn.id))
- .flat_map(|g| self.cmd.unroll_args_in_group(&g.id))
- .collect::<Vec<_>>();
-
- for a in unrolled_reqs
- .iter()
- .chain(incls.iter())
- .filter(|name| !self.cmd.get_positionals().any(|p| &&p.id == name))
- .filter(|name| !self.cmd.get_groups().any(|g| &&g.id == name))
- .filter(|name| !args_in_groups.contains(name))
- .filter(|name| {
- !(matcher.is_some()
- && matcher
- .as_ref()
- .unwrap()
- .check_explicit(name, ArgPredicate::IsPresent))
- })
- {
- debug!("Usage::get_required_usage_from:iter:{:?}", a);
- let arg = self.cmd.find(a).expect(INTERNAL_ERROR_MSG).to_string();
- ret_val.insert(arg);
- }
- let mut g_vec: Vec<String> = vec![];
- for g in unrolled_reqs
- .iter()
- .filter(|n| self.cmd.get_groups().any(|g| g.id == **n))
- {
- // don't print requirement for required groups that have an arg.
- if let Some(m) = matcher {
- let have_group_entry = self
- .cmd
- .unroll_args_in_group(g)
- .iter()
- .any(|arg| m.check_explicit(arg, ArgPredicate::IsPresent));
- if have_group_entry {
- continue;
+ let mut required_groups_members = IndexSet::new();
+ let mut required_opts = IndexSet::new();
+ let mut required_groups = IndexSet::new();
+ let mut required_positionals = Vec::new();
+ for req in unrolled_reqs.iter().chain(incls.iter()) {
+ if let Some(arg) = self.cmd.find(req) {
+ let is_present = matcher
+ .map(|m| m.check_explicit(req, ArgPredicate::IsPresent))
+ .unwrap_or(false);
+ debug!(
+ "Usage::get_required_usage_from:iter:{:?} arg is_present={}",
+ req, is_present
+ );
+ if !is_present {
+ if arg.is_positional() {
+ if incl_last || !arg.is_last_set() {
+ required_positionals.push((arg.index.unwrap(), arg.to_string()));
+ }
+ } else {
+ required_opts.insert(arg.to_string());
+ }
+ }
+ } else {
+ debug_assert!(self.cmd.find_group(req).is_some());
+ let group_members = self.cmd.unroll_args_in_group(req);
+ let is_present = matcher
+ .map(|m| {
+ group_members
+ .iter()
+ .any(|arg| m.check_explicit(arg, ArgPredicate::IsPresent))
+ })
+ .unwrap_or(false);
+ debug!(
+ "Usage::get_required_usage_from:iter:{:?} group is_present={}",
+ req, is_present
+ );
+ if !is_present {
+ let elem = self.cmd.format_group(req);
+ required_groups.insert(elem);
+ required_groups_members.extend(
+ group_members
+ .iter()
+ .flat_map(|id| self.cmd.find(id))
+ .map(|arg| arg.to_string()),
+ );
}
- }
-
- let elem = self.cmd.format_group(g);
- if !g_vec.contains(&elem) {
- g_vec.push(elem);
}
}
- ret_val.extend(g_vec);
- let mut pvec = unrolled_reqs
- .iter()
- .chain(incls.iter())
- .filter(|a| self.cmd.get_positionals().any(|p| &&p.id == a))
- .filter(|&pos| {
- matcher.map_or(true, |m| !m.check_explicit(pos, ArgPredicate::IsPresent))
- })
- .filter_map(|pos| self.cmd.find(pos))
- .filter(|&pos| incl_last || !pos.is_last_set())
- .filter(|pos| !args_in_groups.contains(&pos.id))
- .map(|pos| (pos.index.unwrap(), pos))
- .collect::<Vec<(usize, &Arg)>>();
- pvec.sort_by_key(|(ind, _)| *ind); // sort by index
-
- for (_, p) in pvec {
- debug!("Usage::get_required_usage_from:push:{:?}", p.id);
- if !args_in_groups.contains(&p.id) {
- ret_val.insert(p.to_string());
+ required_opts.retain(|arg| !required_groups_members.contains(arg));
+ ret_val.extend(required_opts);
+
+ ret_val.extend(required_groups);
+
+ required_positionals.sort_by_key(|(ind, _)| *ind); // sort by index
+ for (_, p) in required_positionals {
+ if !required_groups_members.contains(&p) {
+ ret_val.insert(p);
}
}
diff --git a/vendor/clap/src/parser/arg_matcher.rs b/vendor/clap/src/parser/arg_matcher.rs
index 8d15c5799..22087e722 100644
--- a/vendor/clap/src/parser/arg_matcher.rs
+++ b/vendor/clap/src/parser/arg_matcher.rs
@@ -74,9 +74,7 @@ impl ArgMatcher {
// a default value of `other` myprog would have an existing MatchedArg for
// `--global-arg` where the value is `other`
let to_update = if let Some(parent_ma) = vals_map.get(global_arg) {
- if parent_ma.check_explicit(ArgPredicate::IsPresent)
- && !ma.check_explicit(ArgPredicate::IsPresent)
- {
+ if parent_ma.source() > ma.source() {
parent_ma
} else {
ma
diff --git a/vendor/clap/src/parser/error.rs b/vendor/clap/src/parser/error.rs
index bdafa9ae5..caeba4b8f 100644
--- a/vendor/clap/src/parser/error.rs
+++ b/vendor/clap/src/parser/error.rs
@@ -54,3 +54,14 @@ impl std::fmt::Display for MatchesError {
}
}
}
+
+#[test]
+fn check_auto_traits() {
+ static_assertions::assert_impl_all!(
+ MatchesError: Send,
+ Sync,
+ std::panic::RefUnwindSafe,
+ std::panic::UnwindSafe,
+ Unpin
+ );
+}
diff --git a/vendor/clap/src/parser/matches/arg_matches.rs b/vendor/clap/src/parser/matches/arg_matches.rs
index 17fa63ca6..2585c0219 100644
--- a/vendor/clap/src/parser/matches/arg_matches.rs
+++ b/vendor/clap/src/parser/matches/arg_matches.rs
@@ -119,6 +119,69 @@ impl ArgMatches {
MatchesError::unwrap(&internal_id, self.try_get_one(id))
}
+ /// Gets the value of a specific [`ArgAction::Count`][crate::ArgAction::Count] flag
+ ///
+ /// # Panic
+ ///
+ /// If the argument's action is not [`ArgAction::Count`][crate::ArgAction::Count]
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// # use clap::Command;
+ /// # use clap::Arg;
+ /// let cmd = Command::new("mycmd")
+ /// .arg(
+ /// Arg::new("flag")
+ /// .long("flag")
+ /// .action(clap::ArgAction::Count)
+ /// );
+ ///
+ /// let matches = cmd.clone().try_get_matches_from(["mycmd", "--flag", "--flag"]).unwrap();
+ /// assert_eq!(
+ /// matches.get_count("flag"),
+ /// 2
+ /// );
+ /// ```
+ #[track_caller]
+ pub fn get_count(&self, id: &str) -> u8 {
+ *self
+ .get_one::<u8>(id)
+ .expect("ArgAction::Count is defaulted")
+ }
+
+ /// Gets the value of a specific [`ArgAction::SetTrue`][crate::ArgAction::SetTrue] or [`ArgAction::SetFalse`][crate::ArgAction::SetFalse] flag
+ ///
+ /// # Panic
+ ///
+ /// If the argument's action is not [`ArgAction::SetTrue`][crate::ArgAction::SetTrue] or [`ArgAction::SetFalse`][crate::ArgAction::SetFalse]
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// # use clap::Command;
+ /// # use clap::Arg;
+ /// let cmd = Command::new("mycmd")
+ /// .arg(
+ /// Arg::new("flag")
+ /// .long("flag")
+ /// .action(clap::ArgAction::SetTrue)
+ /// );
+ ///
+ /// let matches = cmd.clone().try_get_matches_from(["mycmd", "--flag", "--flag"]).unwrap();
+ /// assert!(matches.contains_id("flag"));
+ /// assert_eq!(
+ /// matches.get_flag("flag"),
+ /// true
+ /// );
+ /// ```
+ #[track_caller]
+ pub fn get_flag(&self, id: &str) -> bool {
+ *self
+ .get_one::<bool>(id)
+ .expect("ArgAction::SetTrue / ArgAction::SetFalse is defaulted")
+ }
+
/// Iterate over values of a specific option or positional argument.
///
/// i.e. an argument that takes multiple values at runtime.
@@ -604,13 +667,13 @@ impl ArgMatches {
value.and_then(MatchedArg::source)
}
- /// Deprecated, replaced with [`ArgAction::Count`][crate::ArgAction] or
- /// [`ArgMatches::get_many`]`.len()`.
+ /// Deprecated, replaced with [`ArgAction::Count`][crate::ArgAction],
+ /// [`ArgMatches::get_many`]`.len()`, or [`ArgMatches::value_source`].
#[cfg_attr(
feature = "deprecated",
deprecated(
since = "3.2.0",
- note = "Replaced with either `ArgAction::Count` or `ArgMatches::get_many(...).len()`"
+ note = "Replaced with either `ArgAction::Count`, `ArgMatches::get_many(...).len()`, or `ArgMatches::value_source`"
)
)]
#[cfg_attr(debug_assertions, track_caller)]
@@ -1742,6 +1805,11 @@ mod tests {
use super::*;
#[test]
+ fn check_auto_traits() {
+ static_assertions::assert_impl_all!(ArgMatches: Send, Sync, Unpin);
+ }
+
+ #[test]
fn test_default_values() {
#![allow(deprecated)]
let mut values: Values = Values::default();
diff --git a/vendor/clap/src/parser/parser.rs b/vendor/clap/src/parser/parser.rs
index fc95dad22..ad2bc6e9c 100644
--- a/vendor/clap/src/parser/parser.rs
+++ b/vendor/clap/src/parser/parser.rs
@@ -98,77 +98,6 @@ impl<'help, 'cmd> Parser<'help, 'cmd> {
arg_os.to_value_os().as_raw_bytes()
);
- // Correct pos_counter.
- pos_counter = {
- let is_second_to_last = pos_counter + 1 == positional_count;
-
- // The last positional argument, or second to last positional
- // argument may be set to .multiple_values(true) or `.multiple_occurrences(true)`
- let low_index_mults = is_second_to_last
- && self
- .cmd
- .get_positionals()
- .any(|a| a.is_multiple() && (positional_count != a.index.unwrap_or(0)))
- && self
- .cmd
- .get_positionals()
- .last()
- .map_or(false, |p_name| !p_name.is_last_set());
-
- let missing_pos = self.cmd.is_allow_missing_positional_set()
- && is_second_to_last
- && !trailing_values;
-
- debug!(
- "Parser::get_matches_with: Positional counter...{}",
- pos_counter
- );
- debug!(
- "Parser::get_matches_with: Low index multiples...{:?}",
- low_index_mults
- );
-
- if low_index_mults || missing_pos {
- let skip_current = if let Some(n) = raw_args.peek(&args_cursor) {
- if let Some(arg) = self
- .cmd
- .get_positionals()
- .find(|a| a.index == Some(pos_counter))
- {
- // If next value looks like a new_arg or it's a
- // subcommand, skip positional argument under current
- // pos_counter(which means current value cannot be a
- // positional argument with a value next to it), assume
- // current value matches the next arg.
- self.is_new_arg(&n, arg)
- || self
- .possible_subcommand(n.to_value(), valid_arg_found)
- .is_some()
- } else {
- true
- }
- } else {
- true
- };
-
- if skip_current {
- debug!("Parser::get_matches_with: Bumping the positional counter...");
- pos_counter + 1
- } else {
- pos_counter
- }
- } else if trailing_values
- && (self.cmd.is_allow_missing_positional_set() || contains_last)
- {
- // Came to -- and one positional has .last(true) set, so we go immediately
- // to the last (highest index) positional
- debug!("Parser::get_matches_with: .last(true) and --, setting last pos");
- positional_count
- } else {
- pos_counter
- }
- };
-
// Has the user already passed '--'? Meaning only positional args follow
if !trailing_values {
if self.cmd.is_subcommand_precedence_over_arg_set()
@@ -376,6 +305,77 @@ impl<'help, 'cmd> Parser<'help, 'cmd> {
}
}
+ // Correct pos_counter.
+ pos_counter = {
+ let is_second_to_last = pos_counter + 1 == positional_count;
+
+ // The last positional argument, or second to last positional
+ // argument may be set to .multiple_values(true) or `.multiple_occurrences(true)`
+ let low_index_mults = is_second_to_last
+ && self
+ .cmd
+ .get_positionals()
+ .any(|a| a.is_multiple() && (positional_count != a.index.unwrap_or(0)))
+ && self
+ .cmd
+ .get_positionals()
+ .last()
+ .map_or(false, |p_name| !p_name.is_last_set());
+
+ let missing_pos = self.cmd.is_allow_missing_positional_set()
+ && is_second_to_last
+ && !trailing_values;
+
+ debug!(
+ "Parser::get_matches_with: Positional counter...{}",
+ pos_counter
+ );
+ debug!(
+ "Parser::get_matches_with: Low index multiples...{:?}",
+ low_index_mults
+ );
+
+ if low_index_mults || missing_pos {
+ let skip_current = if let Some(n) = raw_args.peek(&args_cursor) {
+ if let Some(arg) = self
+ .cmd
+ .get_positionals()
+ .find(|a| a.index == Some(pos_counter))
+ {
+ // If next value looks like a new_arg or it's a
+ // subcommand, skip positional argument under current
+ // pos_counter(which means current value cannot be a
+ // positional argument with a value next to it), assume
+ // current value matches the next arg.
+ self.is_new_arg(&n, arg)
+ || self
+ .possible_subcommand(n.to_value(), valid_arg_found)
+ .is_some()
+ } else {
+ true
+ }
+ } else {
+ true
+ };
+
+ if skip_current {
+ debug!("Parser::get_matches_with: Bumping the positional counter...");
+ pos_counter + 1
+ } else {
+ pos_counter
+ }
+ } else if trailing_values
+ && (self.cmd.is_allow_missing_positional_set() || contains_last)
+ {
+ // Came to -- and one positional has .last(true) set, so we go immediately
+ // to the last (highest index) positional
+ debug!("Parser::get_matches_with: .last(true) and --, setting last pos");
+ positional_count
+ } else {
+ pos_counter
+ }
+ };
+
if let Some(arg) = self.cmd.get_keymap().get(&pos_counter) {
if arg.is_last_set() && !trailing_values {
let _ = self.resolve_pending(matcher);
@@ -738,8 +738,10 @@ impl<'help, 'cmd> Parser<'help, 'cmd> {
}
};
if long_arg.is_empty() {
- debug_assert!(long_value.is_none(), "{:?}", long_value);
- return Ok(ParseResult::NoArg);
+ debug_assert!(
+ long_value.is_some(),
+ "`--` should be filtered out before this point"
+ );
}
let arg = if let Some(arg) = self.cmd.get_keymap().get(long_arg) {