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
Kat Marchán
814b56dccb
feat(derive): Add support from inheriting global options in subcommands
2021-05-18 17:39:51 +01:00
Eldritch Cheese
fa991754d3
imp(validator): Case-insensitive required_if_eq when arg is case-insensitive
2021-05-15 09:45:24 -07:00
Pavan Kumar Sunkara
a4b9bfc97b
Merge pull request #2481 from kolloch/feature/no-clone-in-insert
...
Input.insert: No need to clone
2021-05-13 19:13:00 +01:00
Peter Kolloch
e89f1e6c4d
Input.insert: No need to clone
2021-05-13 13:29:01 +02:00
Pavan Kumar Sunkara
73cf47a533
Merge pull request #2472 from ldm0/master
...
Fix clippy errors and warnings
2021-05-08 09:39:07 +01:00
Donough Liu
2a921d4cda
Fix clippy warnings.
2021-05-07 19:05:18 +00:00
liudingming
529c55f753
Relax trait bound on clap Error source
2021-05-08 01:56:13 +08:00
Pavan Kumar Sunkara
df69011025
Merge pull request #2470 from ldm0/master
...
Add multiple_* parsing for yaml
2021-05-07 12:26:59 +01:00
liudingming
4dfc900a99
Clippy fix
2021-05-07 15:20:03 +08:00
liudingming
64e226ef33
Add multiple_* parsing for yaml
2021-05-07 14:34:03 +08:00
liudingming
a995e5a204
Add yaml multiple_* tests
2021-05-07 14:34:03 +08:00
Pavan Kumar Sunkara
8e1a2e1114
Update issue templates
2021-05-02 19:34:53 +01:00
Pavan Kumar Sunkara
92f744cc49
Merge pull request #2455 from sharnoff/master
...
add missing `$crate::` in `clap_app!` for arg.about(...)
2021-04-27 20:15:56 +01:00
sharnoff
47aaca1e5d
change 'tests/macros.rs' to not import clap_app!
...
This should help to guard against future errors where `clap_app!` refers
to itself without the required "$crate::" prefix
2021-04-27 11:21:54 -07:00
sharnoff
5ec28b6093
add missing $crate::
in clap_app!
2021-04-25 19:00:19 -07:00
Pavan Kumar Sunkara
d253c34676
Merge pull request #2442 from clap-rs/ci
...
Get github ci for working for mingw
2021-04-14 04:10:13 +05:30
Pavan Kumar Sunkara
f42495d552
Improve cancelling of previous runs
2021-04-13 22:49:19 +01:00
Pavan Kumar Sunkara
99d4aba95c
Remove azure pipelines
2021-04-13 22:46:24 +01:00
Pavan Kumar Sunkara
e20c0c7a5d
Get github ci for working for mingw
2021-04-13 22:20:05 +01:00
Pavan Kumar Sunkara
9c99c358c6
Merge pull request #2440 from reaganmcf/app-setting-subcommand-help-long-form
...
setting: UseLongFormatForHelpSubcommand
2021-04-13 04:42:51 +05:30
Reagan McFarland
b184dc001b
setting: SubcommandHelpShowsLongForm implemented
...
Refactoring and better test cases
Refactored SubcommandHelpShowsLongForm to
UseLongFormatForHelpSubcommand.
Tests and docuemntation examples use about and long_about instead of
(before/after)_help.
Removed commented out tests
Linting: Fix trailing new line
Updated change log, refactored tests and doc str
Reordered items in the Changelog
New test added and old tests removed that were redundant
Doc string for AppSettings::UseLongFormatForHelpSubcommand fixed
2021-04-11 14:31:40 -04:00
Pavan Kumar Sunkara
5bcc502e8b
Merge pull request #2441 from clap-rs/deps
...
Specify dep patch versions
2021-04-11 16:27:18 +05:30
Pavan Kumar Sunkara
3c9cc0cf91
Specify dep patch versions
2021-04-11 10:38:13 +01:00
Pavan Kumar Sunkara
9be6db5999
Merge pull request #2436 from ajeetdsouza/ajeet/elvish
...
Fix completions for Elvish shell
2021-04-08 18:57:48 +05:30
Ajeet D'Souza
401744e24b
Remove old slice syntax
2021-04-08 17:10:17 +05:30