anatawa12
89d1519f69
Show summary in subcommands list ( #2558 )
...
* Show short about in SUBCOMMANDS list
* add tests
* move test
* cargo fmt
2021-06-20 16:28:50 +01:00
Pavan Kumar Sunkara
c5cbc750cb
Merge pull request #2548 from remilauzier/master
...
Update dependency that need no change
2021-06-18 00:51:18 +01:00
Ethan Budd
6a48698fcd
Add a new arg option for the max_occurrences ( #2543 )
...
* add a new arg option for the max_occurrences
* check ErrorKind in tests
* Updated grammer in doc comments
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
* assert is_err() before unwraping
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2021-06-17 19:54:24 +01:00
Pavan Kumar Sunkara
373ded784c
Fix clippy lint
2021-06-17 19:19:56 +01:00
Rémi Lauzier
48147d680b
Update dependency that need no change
2021-06-17 13:58:40 -04:00
Pavan Kumar Sunkara
a531d3935a
Merge pull request #2544 from remilauzier/master
...
Fix some nightly clippy warnings
2021-06-17 17:30:01 +01:00
Pavan Kumar Sunkara
641bd72d06
Update feature_request.yml
2021-06-17 12:12:51 +01:00
Rémi Lauzier
c4f534228b
Fix some nightly clippy warnings
2021-06-16 23:25:13 -04:00
Pavan Kumar Sunkara
947523f7f5
Merge pull request #2480 from kolloch/feature/partial-parsing
...
setting: IgnoreErrors - Allow parsing despite missing option values
2021-06-16 09:09:52 +01:00
Pavan Kumar Sunkara
412b71efb6
Merge pull request #2538 from clap-rs/multiple
...
Removed Arg::multiple
2021-06-16 09:08:39 +01:00
Pavan Kumar Sunkara
e5e20b389e
Forbid multiple_occurrences for positional args
2021-06-16 08:27:04 +01:00
Pavan Kumar Sunkara
3f94d17c71
Removed Arg::multiple
2021-06-16 07:17:11 +01:00
Pavan Kumar Sunkara
43909ddefc
Fix some docs for app settings
2021-06-16 02:54:49 +01:00
Pavan Kumar Sunkara
cedd110f10
Solve indexmap issue on WSL in ubuntu
2021-06-16 02:27:49 +01:00
Peter Kolloch
171dcbe424
setting: IgnoreErrors - Reaction to review comments
...
https://github.com/clap-rs/clap/pull/2480
2021-06-14 10:26:23 +02:00
Peter Kolloch
b0310e2d6e
settings: IgnoreErrors - prefix debug statements with fn name
2021-06-14 10:26:23 +02:00
Peter Kolloch
c50d338962
setting: IgnoreErrors - Allow parsing despite missing option values
...
Implemented as AppSetting::Ignore errors as suggested by
@CreepySkeleton in
https://github.com/clap-rs/clap/issues/1880#issuecomment-637779787 .
This is not a complete implementation but it works already in
surprisingly many situations.
https://github.com/clap-rs/clap/issues/1880
2021-06-14 10:26:18 +02:00
Pavan Kumar Sunkara
36c972a302
Merge pull request #2532 from tshepang/missing-type
...
the word "Subcommand" was accidentally removed
2021-06-13 23:46:33 +01:00
Tshepang Lekhonkhobe
f8a55930b7
Update examples/18_builder_macro.rs
...
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2021-06-12 22:27:27 +02:00
Tshepang Lekhonkhobe
7d9d6f3e51
Update examples/08_subcommands.rs
...
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2021-06-12 22:25:56 +02:00
Tshepang Lekhonkhobe
661024a521
the word "Subcommand" was accidentally removed
...
Was done in 03333800fe
2021-06-11 22:41:37 +02:00
Pavan Kumar Sunkara
585a7c955c
Merge pull request #2530 from pickfire/patch-2
...
Fix double space in CONTRIBUTING.md
2021-06-10 16:42:29 +01:00
Ivan Tham
34bba9c0d7
Fix double space in CONTRIBUTING.md
2021-06-10 19:21:01 +08:00
Pavan Kumar Sunkara
b4d9f95ea1
Merge pull request #2529 from edlanglois/arg-enum-err
...
Derived ArgEnum::from_str returns Err instead of panicking
2021-06-09 00:08:18 +01:00
Eric Langlois
c20acaf2d4
Derived ArgEnum::from_str returns Err instead of panicking
...
ArgEnum is public so it is possible for users to call it with
a non-variant input string.
2021-06-08 16:40:12 -04:00
Tshepang Lekhonkhobe
e3bfa50e8f
docs: fix links to Subcommand ( #2518 )
...
* docs: fix links to Subcommand
These were broken by 03333800fe
* docs: remove crate links from body content
Addresses code review
* docs: allow some room to breath
Addresses code review
2021-06-07 11:19:45 +01:00
rami3l
6e158d9f8d
refactor(validator): cleanup code ( #2512 )
...
* refactor(validator): use filtermap style for `gather_conflicts` and `validate_exclusive`
* refactor(validator): remove nested `filter`s in `build_conflict_err_usage`
* refactor(validator): add more code beautifying
* refactor(validator): revert some unnecessary changes
* refactor(validator): revert some unnecessary changes, take 2
2021-06-07 00:45:45 +01:00
Pavan Kumar Sunkara
dc8d0f1b08
Merge pull request #2525 from tertsdiepraam/infer-long-args
...
Infer long arguments
2021-06-06 20:55:10 +01:00
Terts Diepraam
6a574bf73c
Fix documentation for InferLongArgs
...
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2021-06-06 12:32:32 +02:00
Terts Diepraam
834f600a6f
infer long arguments
2021-06-05 13:18:06 +02:00
Pavan Kumar Sunkara
a8134ddcda
Merge pull request #2515 from clap-rs/yaml
...
Ignore extra fields in YAML only when specified
2021-06-01 22:44:52 +01:00
Pavan Kumar Sunkara
82e42cd07e
Ignore extra fields in YAML only when specified
2021-06-01 21:59:44 +01:00
Pavan Kumar Sunkara
24f5cd6555
Merge pull request #2511 from rami3l/fix/flag-subcmd
...
refactor(parser): remove `bool` field in `ParseResult::FlagSubCommandShort`
2021-05-31 09:08:51 +01:00
rami3l
a91ca7fc1b
refactor(parser): encode all parsing state of FlagSubCommand
in Parser
2021-05-29 21:26:21 +02:00
rami3l
65b3892ef6
docs: add more explanation to #2501 fix ( #2507 )
...
* fix(parser): replace `unwrap` with `expect`
* docs(parser): add more comments explaining `done_short_args`
* docs(parser): add more comments explaining `keep_state`
2021-05-28 21:51:00 +01:00
rami3l
fbd338ce26
fix: flag_subcommands
unexpected behavior after long arg ( #2501 )
...
* fix(wip): add necessary debugging prints for analysis
* fix(wip): implement the fix, take 1
* docs: add docstring for `Parser::flag_subcmd_at` and `Parser::flag_subcmd_skip`
* test: make `flag_subcommand_short_after_long_arg` test more realistic
2021-05-27 05:14:50 +05:30
Pavan Kumar Sunkara
750aba282f
Add cookbook section to site
2021-05-26 17:32:00 +05:30
Pavan Kumar Sunkara
bddb63effe
Compare clap with structopt, fixes #1584
2021-05-26 01:08:12 +01:00
Pavan Kumar Sunkara
6a395d3208
ArgMacthes::is_present should not deal with subcommands at all, fixes #2494
2021-05-26 00:40:38 +01:00
Pavan Kumar Sunkara
5c9cd1afdf
Update CI
2021-05-25 23:42:55 +01:00
Pavan Kumar Sunkara
94ce18c399
Update badges
2021-05-25 23:19:32 +01:00
Ajeet D'Souza
5809ae6060
feat: Add AppSettings::DisableEnv ( #2493 )
...
* Add DisableEnv flag
* Apply formatting
* Add tests
2021-05-21 00:47:47 +05:30
Ajeet D'Souza
460459c771
fix(usage): Move positional args to end of usage string ( #2492 )
...
* Move positional args to end of USAGE
* Remove -- from usage string
2021-05-21 00:29:21 +05:30
Pavan Kumar Sunkara
abe2373cca
Merge pull request #2026 from zkat/master
...
feat(derive): Add support from inheriting global options in subcommands
2021-05-20 13:52:24 +01:00
Felipe Sere
46cd4fe664
Run fmt
2021-05-19 19:43:06 +01:00
Felipe Sere
6bac0c53bf
Rename flag parameter to not clash with subcommand
2021-05-19 19:42:39 +01:00
Pavan Kumar Sunkara
54dffec127
Added homepage for website, fixes #2478
2021-05-18 23:46:23 +01:00
Felipe Sere
03d4989ef9
Replicate the derive test for from_global
2021-05-18 22:21:18 +01:00
Felipe Sere
856de610a2
Create a separate test for from_global
2021-05-18 21:35:49 +01:00
Pavan Kumar Sunkara
278d17048f
Merge pull request #2452 from Lunderberg/master
...
imp(validator): Case-insensitive required_if_eq when arg is case-insensitive
2021-05-18 20:40:18 +01:00