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]
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
NickHackman
6ddf940ac3
fix: conflicts between flag scs and args alias
...
When debug_assertions flag is active, properly handles conflicts between
flag subcommands short and long their aliases and args and their
aliases prevents self conflicts where the alias and the flag subcomand
were the same.
2020-07-11 15:01:18 -04:00
NickHackman
432be5bc30
tests: conflicts with flag sc and arg aliases
...
Tests to check for conflicts between flag subcommands long and short and
their aliases and args both long and short and their aliases. Tests to
handle self conflicts, where a flag subcommand short or long with have a
corresponding alias with the same value.
2020-07-11 15:00:40 -04:00
NickHackman
cf9265d660
fix: failing doc test
2020-07-10 09:36:39 -04:00
NickHackman
5118cec1b1
fix: long_flag_aliases instead of using alias
...
Previously long_flag alias checks were against normal aliases instead of
specifically designated long_flag aliases, this is more clear and explicit.
2020-07-10 09:27:14 -04:00
NickHackman
f5aabfa482
style: rename short, long -> short_flag, long_flag
...
These names are more explicit about what short and
long flag subcommands are.
2020-07-10 08:52:13 -04:00
bors[bot]
d8fccdb0ea
Merge #1986
...
1986: Custom subcommand placeholders r=pksunkara a=kitlith
Co-authored-by: Kitlith <kitlith@kitl.pw>
2020-07-10 12:51:30 +00:00
bors[bot]
608b982bbe
Merge #1997
...
1997: Cleanup setings r=pksunkara a=CreepySkeleton
Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-07-10 09:53:47 +00:00
NickHackman
0a266f8c8c
fix: merge related issues
...
get_subcommands() now returns an impl Iterator rather than a slice,
match_alias! removed
2020-07-09 22:15:48 -04:00
Nick Hackman
27441329f9
Merge branch 'master' into flag-subcommands
2020-07-09 21:31:13 -04:00
NickHackman
a3f8ddb0b0
doc: removed '[``]' from documentation
2020-07-08 21:46:00 -04:00
NickHackman
1127ca6e13
feat: Usage displays short, long, and normal scs
...
Displayed in the form of
pacman {query, --query, -Q} [OPTIONS]
2020-07-08 21:37:56 -04:00
NickHackman
ec35ab8813
feat: long flag subcommand infer
...
Added tests and feature to infer long flag subcommands similarly to
normal subcommands.
2020-07-08 00:11:28 -04:00
NickHackman
1ea7178629
refractor: find_*_subcmd macro -> fn
...
Moved from macro implementations to function implementations.
2020-07-07 22:57:38 -04:00
NickHackman
59a14f8e6a
fix: no longer cloning all Apps and Args for debug
...
Previously `Flag::App` and `Flag::Arg` both owned their App/Arg which
required many, many clones. This is unnecessary.
2020-07-07 22:36:12 -04:00
NickHackman
5db25e6a72
refractor: improved parser ergonomics
...
No longer abusing external_subcommand, but using subcmd_name in order to
parse a subcommand, added a `keep_state` variable in order to handle the
hacky solution of short command line arguments.
2020-07-07 22:26:44 -04:00
NickHackman
8a68f99750
example: more pacman-like and refractor
...
Removed user facing panics and improved ergonomics to behave more like
pacman behaves.
2020-07-07 21:26:38 -04:00
Kitlith
96daa203b9
cargo fmt
2020-07-07 00:23:00 -07:00
Kitlith
5f601b7ecd
Manually specify the header for subcommands.
...
Also fleshed out the documentation for subcommand_placeholder a bit.
2020-07-06 20:08:26 -07:00
bors[bot]
e8d46f4036
Merge #1989
...
1989: Replace macros with proper functions r=pksunkara a=CreepySkeleton
Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-07-06 18:51:07 +00:00
CreepySkeleton
7e8d120543
Make getters return iterators rather than slices
2020-07-06 17:33:02 +03:00
CreepySkeleton
51d0b31105
Fix test
2020-07-06 17:26:53 +03:00
CreepySkeleton
46679d88d6
Use method(bool) instead of manipulating ArgSettings explicitly
2020-07-02 05:42:28 +03:00
CreepySkeleton
b23890358a
Remove ArgSettings::UseValueDelimiter
2020-07-02 05:02:28 +03:00
bors[bot]
9fc8ec965e
Merge #1995
...
1995: Move to terminal_size dep after the recent textwrap upgrade r=CreepySkeleton a=pksunkara
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-07-01 10:00:24 +00:00