CreepySkeleton
32414fbdff
Fix and rearrange debug asserts
2020-08-12 06:12:42 +03:00
CreepySkeleton
619658e17a
Add test
2020-08-12 02:39:59 +03:00
CreepySkeleton
18a58af3ac
Allow validators to be FnMut
2020-08-12 02:39:59 +03:00
CreepySkeleton
790a0f5e62
Make sure that App & Arg & ArgGroup implement Send + Sync
...
Also relaxes 'static restriction on validators.
2020-08-12 02:39:59 +03:00
bors[bot]
9185366420
Merge #2058
...
2058: Add blank line between items in long help r=pksunkara a=mkantor
Co-authored-by: Matt Kantor <the.matt.kantor@gmail.com>
2020-08-11 23:30:48 +00:00
Matt Kantor
0d8ebeb36b
Fix doc comment for Arg::long_about.
2020-08-11 15:30:30 -07:00
Matt Kantor
f7e2fbf150
Print an empty line after multi-line argument help.
...
Fixes #1642 .
2020-08-11 15:30:30 -07:00
Matt Kantor
bf34c04060
Add a test for --help with long argument help.
2020-08-11 15:30:30 -07:00
Pavan Kumar Sunkara
5c0947f160
Add derive traits only if derive feature is enabled
2020-08-11 16:30:02 +02:00
Pavan Kumar Sunkara
9b22f19995
Update more docs
2020-08-11 16:08:05 +02:00
Kevin K
89fcc755e4
wip: doc updates for App
...
Still more to do in this file, hence the wip status
2020-08-11 15:41:00 +02:00
Kevin K
aa694c893f
docs(FromArgMatches): initial draft
2020-08-11 15:21:58 +02:00
Kevin K
763f0a0363
wip: Clap trait docs
2020-08-11 15:21:57 +02:00
Kevin K
609202e2a0
wip: clap_derive docs
2020-08-11 15:21:57 +02:00
Kevin K
c76f526773
adds ctags to the gitignore
2020-08-11 15:21:57 +02:00
bors[bot]
da92a32d10
Merge #2048
...
2048: Change the ret tyte of Argmatches::subcommand r=pksunkara a=CreepySkeleton
Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-08-11 00:20:35 +00:00
bors[bot]
6492ae2353
Merge #1793
...
1793: Add hinting of arg value types for zsh/fish completion r=CreepySkeleton a=intgr
Co-authored-by: Marti Raudsepp <marti@juffo.org>
2020-08-07 18:14:01 +00:00
Marti Raudsepp
64ee0f8009
Add hinting of arg value types for zsh/fish completion
...
Adds new method/attribute `Arg::value_hint`, taking a `ValueHint` enum
as argument. The hint can denote accepted values, for example: paths,
usernames, hostnames, commands, etc.
This initial implementation supports hints for the zsh and fish
completion generators, support for other shells can be added later.
2020-08-06 22:17:31 +03:00
CreepySkeleton
f0044d205d
Remove a redundant lifetime
2020-08-05 22:33:51 +03:00
CreepySkeleton
e6cc49ecde
Adjust derive
2020-08-05 17:07:13 +03:00
CreepySkeleton
e9759a241b
Adjust examples and tests
2020-08-05 17:07:13 +03:00
CreepySkeleton
6dcf93be00
Change the return type of ArgMatches::subcommand()
2020-08-05 13:35:42 +03:00
bors[bot]
a4bc1f2abc
Merge #2038
...
2038: Improve iterator use r=CreepySkeleton a=nnethercote
Co-authored-by: Nicholas Nethercote <nnethercote@mozilla.com>
2020-07-29 02:14:00 +00:00
Nicholas Nethercote
ed46e8962c
refactor: Combine two large and very similar expressions.
2020-07-29 10:35:36 +10:00
Nicholas Nethercote
7fb397d905
refactor: Simplify some it.any(...)
calls.
2020-07-29 10:35:34 +10:00
Nicholas Nethercote
be535e28cf
refactor: Avoid unnecessary uses of enumerate()
.
2020-07-29 10:35:31 +10:00
Nicholas Nethercote
d8c775eb26
refactor: Replace it.filter(...).find(...)
with it.find(...)
.
2020-07-29 10:35:27 +10:00
Nicholas Nethercote
217b111bd7
refactor: Replace it.find(...).is_none()
with !it.any(...)
.
2020-07-29 10:35:22 +10:00
bors[bot]
dbdd63b350
Merge #2016
...
2016: imp(errors): Provide the missing required arguments as info r=CreepySkeleton a=nickelc
Co-authored-by: Constantin Nickel <constantin.nickel@gmail.com>
2020-07-26 08:08:35 +00:00
bors[bot]
dda961b715
Merge #2027
...
2027: style: rename ErrorKind::{VersionDisplayed, HelpDisplayed} to present tense r=CreepySkeleton a=siyopao
Co-authored-by: Craig Pastro <siyopao@gmail.com>
2020-07-26 07:36:52 +00:00
bors[bot]
dd5e6b2313
Merge #2025
...
2025: Make lifetimes descriptive r=pksunkara a=CreepySkeleton
Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-07-21 16:30:08 +00:00
CreepySkeleton
37c1631f06
Make lifetimes descriptive
2020-07-21 18:59:07 +03:00
bors[bot]
1d57aa2ffb
Merge #2030
...
2030: style: replacing yml with yaml for consistency r=pksunkara a=marcospb19
Co-authored-by: João Marcos <marcospb19@hotmail.com>
2020-07-21 13:11:15 +00:00
bors[bot]
aab97614ed
Merge #2020
...
2020: Implementation of feature request #1918 r=pksunkara a=leo-lb
Co-authored-by: Léo Le Bouter <lle-bout@zaclys.net>
2020-07-21 09:47:23 +00:00
João Marcos
24760bc261
style: replacing yml with yaml for consistency
2020-07-20 20:58:34 -03:00
Léo Le Bouter
eabe8b67b4
Implementation of feature request #1918
2020-07-20 15:35:40 +02:00
Craig Pastro
866f2edbed
style: rename ErrorKind::{VersionDisplayed, HelpDisplayed} to present tense
2020-07-20 10:27:07 +09:00
bors[bot]
dc363d0b91
Merge #2008
...
2008: feat: Added {before/after}_help_long to App struct, closed #1903 r=pksunkara a=Blaxar
Co-authored-by: Blaxar Waldarax <blaxar.waldarax@gmail.com>
2020-07-19 12:28:09 +00:00
Blaxar Waldarax
748aea39f3
feat: Added {before/after}_help_long to App struct, closed #1903
2020-07-19 13:59:53 +02:00
bors[bot]
1dd3fcb954
Merge #2019
...
2019: tests(validators): Add tests for `clap_app!` macro and `FromStr` trait validator r=pksunkara a=nickelc
Co-authored-by: Constantin Nickel <constantin.nickel@gmail.com>
2020-07-19 10:28:03 +00:00
bors[bot]
caa7bc6a15
Merge #2024
...
2024: Fix various typos in docs & code r=pksunkara a=intgr
Co-authored-by: Marti Raudsepp <marti@juffo.org>
2020-07-19 10:04:37 +00:00
Marti Raudsepp
594c535ba2
Fix various typos in docs & code
...
Most errors detected and fixed with Topy (https://github.com/intgr/topy ),
all verified by hand.
2020-07-19 03:10:28 +03:00
Constantin Nickel
066d745653
tests(validators): Add tests for clap_app!
macro and FromStr
trait
2020-07-18 17:47:11 +02:00
bors[bot]
ff6beebd6e
Merge #1974
...
1974: Flag subcommands r=CreepySkeleton a=NickHackman
Co-authored-by: NickHackman <snickhackman@gmail.com>
Co-authored-by: Nick Hackman <31719071+NickHackman@users.noreply.github.com>
2020-07-18 14:06:50 +00:00
NickHackman
6c6b9db45c
fix: clippy lint warning - name change
...
Lint name changed clippy::block_in_if_condition_stmt -> clippy::block_in_if_conditions
2020-07-16 18:05:25 -04:00
NickHackman
21436398a2
docs: improved flag subcommand documentation
...
Improved documentation in flag subcommand example and in
`App::short_flag` and `App::long_flag` method documentation.
2020-07-16 17:48:00 -04:00
Constantin Nickel
6fe48fd51f
imp(errors): Provide the missing required arguments as info
2020-07-15 00:52:06 +02:00
bors[bot]
48d308a8ab
Merge #2010
...
2010: feat(macros): Add `@global $setting` to set global settings r=pksunkara a=nickelc
Co-authored-by: Constantin Nickel <constantin.nickel@gmail.com>
2020-07-14 18:39:26 +00:00
Constantin Nickel
fbfbf8df99
feat(macros): Add @global_setting $setting
to set global settings
2020-07-13 15:13:04 +02:00
NickHackman
0ddd58c935
fix: clippy lint warning
...
Not necessary to borrow the to_string for comparison
2020-07-11 15:21:53 -04:00