ldm0
28b58af63b
Change to num_vals, min_vals, max_vals interacts with Multi*
2021-02-16 03:45:20 +00:00
Collin Styles
2b45011c9b
Update docs for required_unless_present_any
( #2347 )
...
* docs: Correct method name in example
This looks like it was copied from the documentation for
`required_unless_present_all` but not updated accordingly for this
method.
* docs: Add note re `required_unless_present_all` to `required_unless_present_any`
There's a note in the documentation for `required_unless_present_all`
telling users to check out `required_unless_present_any` if that's what
they want. I figured it might be useful to have a similar note in the
documentation for `required_unless_present_any` pointing to that method
as well.
* docs: Fix `required` link in docs for `required_unless_present_all`
* docs: Correct "if" to "unless"
2021-02-15 08:20:11 +00:00
Pavan Kumar Sunkara
a8c9d28ead
Merge pull request #2346 from ldm0/non_fmt_panic_fix
...
Fix part of the non_fmt_panic warnings, bump version-sync to 0.9.2
2021-02-14 01:58:26 +00:00
Pavan Kumar Sunkara
5025ed3bee
Merge pull request #2345 from ldm0/usize
...
Change some u64 to usize
2021-02-14 01:57:53 +00:00
ldm0
ddb53af5dc
Change some u64 to usize
2021-02-13 15:25:40 +00:00
ldm0
580d8d2c63
Fix part of the non_fmt_panic
2021-02-12 17:35:15 +00:00
Pavan Kumar Sunkara
6634444c3c
Remove Arg::settings to be consistent with App
2021-02-12 10:42:38 +00:00
Pavan Kumar Sunkara
8eb5081b53
Update changelog
2021-02-10 23:33:14 +00:00
Pavan Kumar Sunkara
2b5a23597a
Better help message support for hidden and heading stuff
2021-02-08 05:22:27 +00:00
Pavan Kumar Sunkara
3758bba5e2
Remove help_about in favor of mut_arg
2021-02-07 17:22:56 +00:00
Pavan Kumar Sunkara
b824e0b088
Allow nested subcommands mutated generated args to take preference
2021-02-07 16:28:49 +00:00
Pavan Kumar Sunkara
423e2dde00
Remove version_about in favor of mut_arg
2021-02-07 16:14:07 +00:00
Pavan Kumar Sunkara
1bd902370a
Add tests for mut_arg on help and version
2021-02-07 15:54:24 +00:00
Pavan Kumar Sunkara
93a737a4fa
Merge pull request #2333 from clap-rs/build_help_and_version_at_start
...
Build help and version args at the beginning
2021-02-07 15:53:45 +00:00
Pavan Kumar Sunkara
c9cb22905c
Build help and version args at the beginning
2021-02-07 14:46:38 +00:00
ldm0
fb3033834b
Change the way parser do self override
2021-02-07 04:46:56 +00:00
Donough Liu
751adaa687
Remove ContainsLast flag
2021-02-05 10:07:46 +00:00
Donough Liu
cf4881182a
Add comments for some internal app settings
2021-01-30 17:39:34 +00:00
ldm0
5ee6e07858
Fix usage of positional grouped arguments uses arg name rather than val_name
2021-01-24 19:02:43 +00:00
ldm0
68a0ef930a
Fix copied code
2021-01-23 06:41:11 +00:00
AriusX7
448c102f4f
fix: allow visible alias(es) in yaml files
2021-01-20 02:17:17 +05:30
Martin Geisler
72884b2642
docs: Mention correct default value in term_width docstring
...
The default was correctly changed to 100 in #1950 , but later
accidentally reverted in 89fcc75
.
2020-12-31 08:55:56 +01:00
Pavan Kumar Sunkara
a0269a41d4
Merge pull request #2268 from ldm0/fixme
...
Better mkeymap
2020-12-28 10:09:27 +00:00
Donough Liu
120e942e7a
Private arg
2020-12-27 01:46:48 +08:00
budde25
c26d1a4421
imp: added more derives to common App, Arg, and ArgMatches
2020-12-23 17:26:53 -06:00
Pavan Kumar Sunkara
4bd15c45d2
Merge pull request #2253 from ldm0/global
...
Propagate global arg in subcommand to subsubcommand
2020-12-14 02:20:34 +00:00
Donough Liu
1965b9f866
Add BinNameBuilt flag to App
2020-12-13 00:11:12 +08:00
Donough Liu
2f9846d048
Lazy subcommand propagation, avoid redundant _build() function call
...
rustfmt and clippy
Indepth cleaning
Apply suggestions
2020-12-12 22:32:20 +08:00
Donough Liu
fa9be84b18
Propagate global arg in subcommand to subsubcommand
2020-12-12 22:20:16 +08:00
Donough Liu
6fdad97a90
Remove unused flag
2020-12-10 00:58:11 +08:00
Donough Liu
e58f89b3ab
Remove LowIndexMultiplePositional, stop repeatedly calc positional_count
2020-12-10 00:51:18 +08:00
Robin Moussu
6898fbde33
Automatically read license field from Cargo.toml
2020-12-09 00:16:19 +01:00
Pavan Kumar Sunkara
3c93f276b5
Merge pull request #2230 from ahkrr/master
...
refactor: TODO 1.46.0, improve readability by using [] operator
2020-11-28 13:11:50 +00:00
Pavan Kumar Sunkara
b89163afb6
Update MSRV to 1.46
2020-11-28 11:58:28 +00:00
hk
bb7c9896b0
refactor: TODO 1.46.0, improve readability by using [] operator
2020-11-28 11:38:34 +01:00
Pavan Kumar Sunkara
d36d91173d
Merge pull request #2191 from ahkrr/master
...
fix(clap_generate): zsh completion generation panic
2020-11-26 18:36:41 +00:00
hk
895c903b61
refactor: adding get_global, making two functions private
...
preserving the observable behavior of the existing
public api, while handling global arguments separately in
get_arg_conflicts_with
2020-11-09 15:29:00 +01:00
Donough Liu
407cdac8e0
Refactor: remove a persistent parser state ValidNegNumFound
2020-11-08 16:05:07 +08:00
Donough Liu
b1c7785810
Remove replace variable
...
Resolve TODO
Small refactors
More descriptive replaced item recovering
2020-11-08 16:05:03 +08:00
Donough Liu
2b1f47f975
Reduce osstring construction
2020-11-07 16:43:14 +08:00
Donough Liu
020b07b77b
Typo fix
2020-11-07 16:43:14 +08:00
Donough Liu
f17b29acbb
Make Arg::env()
and Arg::env_os()
takes_value(false)
by default
2020-11-06 21:51:39 +01:00
hk
5650e37969
fix: compatability with rustc 1.42.0
...
fixup!
2020-11-05 13:08:04 +01:00
hk
1b451f62ad
fix(clap_generate): zsh completion generation panic
...
zsh completion generation would panic if a global argument
had conflicts with another argument which was present in its
own command but not in its subcommands
2020-10-30 21:04:17 +01:00
bors[bot]
97b4fb639f
Merge #2165
...
2165: Help & Version settings r=pksunkara a=pksunkara
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-10-28 06:27:49 +00:00
Pavan Kumar Sunkara
5dd9584119
Improve the logic for help & version building & parsing
2020-10-26 12:13:03 +01:00
KBR9
625c201f65
Add docs about conflicts_with_all usage in yaml
...
add note about conflicts_with yaml option
add note about conflicts_with yaml option
fix wrapping
remove unnecessary sentence
remove note from conflicts_with
2020-10-24 21:54:01 +02:00
Pavan Kumar Sunkara
e8a06e79cd
Rename setting VersionlessSubcommands => DisableVersionForSubcommands
2020-10-24 16:04:49 +02:00
Pavan Kumar Sunkara
d6e2246aab
Rename setting DisableVersion => DisableVersionFlag
2020-10-24 16:03:12 +02:00
Pavan Kumar Sunkara
45f0ee8b55
Rename setting DisableHelpFlags => DisableHelpFlag
2020-10-24 16:03:12 +02:00
CastilloDel
88ac1f1803
Add assertions for required and default simultaneously
...
Add the suggested changes
Fix test issue_1050_num_vals_and_defaults
It used a required which isn't needed for the purpose of the test.
Add tests for the default+required assertions
Add test for positional args with long or short
2020-10-24 12:10:07 +01:00
bors[bot]
1d0b21908f
Merge #2178
...
2178: Various documentation fixes r=pksunkara a=cstyles
Co-authored-by: Collin Styles <collingstyles@gmail.com>
2020-10-18 22:08:05 +00:00
Collin Styles
0d4e2e5f9d
docs: remove links in documentation for requires_all
...
These links were broken but rather than fix them, let's just remove them
since they're inside the documentation for the function that they link
to which seems unnecessary.
2020-10-18 12:05:33 -07:00
Collin Styles
5b74d84f3c
docs: remove links in documentation for requires_if
functions
...
These links were broken but rather than fix them, let's just remove them
since they're inside the documentation for the functions that they link
to which seems unnecessary.
2020-10-18 12:05:32 -07:00
Collin Styles
3d5e1d987a
docs: add a bunch of missing links to the docs for Arg::env
2020-10-18 12:05:31 -07:00
Collin Styles
ba89a253fc
docs: remove link to allow_hyphen_values
...
This link was broken but rather than fix it, let's just remove it since
it's inside the documentation for the function that it links to which
seems unnecessary.
2020-10-18 12:05:30 -07:00
Collin Styles
8522b9c1cf
docs: fix another typo and add a missing link for Last
2020-10-18 12:05:29 -07:00
Collin Styles
eadecc5c1d
docs: add missing link in ArgGroup
documentation
2020-10-18 12:05:28 -07:00
Collin Styles
75c1fdb707
docs: fix various copy-paste errors related to default_value
functions
2020-10-18 12:05:26 -07:00
Collin Styles
f7837b2ac0
docs: change single quotes to backticks
...
Pretty sure these are just typos.
2020-10-18 12:05:25 -07:00
Collin Styles
9f3cbcd149
docs: wrap Arg in backticks instead of quotes
...
This looks better and is more consistent with the rest of the
documentation.
2020-10-18 12:05:22 -07:00
Collin Styles
b3caf81918
docs: fix a bunch of broken documentation links
2020-10-18 12:05:19 -07:00
CastilloDel
acd3293af2
Add an assertion for positional args defining long or short
...
Also update the docs to reflect that Arg.index shouldn't be
used with long or short
2020-10-18 19:51:13 +01:00
Jacob Mischka
b3e638ad44
Add option to hide autogenerated env section from help text
2020-10-17 16:48:35 -05:00
Wim Looman
b31df047b8
Attach validation error as Error::source
2020-10-13 22:13:04 +02:00
bors[bot]
5a1a209965
Merge #2161
...
2161: Fix parser skipping options without heading set r=pksunkara a=CertainLach
Co-authored-by: Yaroslav Bolyukin <iam@lach.pw>
2020-10-11 08:55:33 +00:00
Marti Raudsepp
cda89a2af1
Fix typos and grammar
...
Some more fixes in addition to 594c535ba2
* Some I noticed manually.
* Some were found by Topy (https://github.com/intgr/topy ), either new
rules from Typo or new code in clap.
* `etc.` and `e.g.` rules were disabled during the last run.
2020-10-10 16:22:05 +03:00
Yaroslav Bolyukin
6050a17024
fix : #2022
...
Parser was skipping default values for options with headings
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
2020-10-09 23:45:11 +05:00
Pavan Kumar Sunkara
8131ead04b
More changelog and consistency
2020-10-09 17:05:51 +02:00
pretzelhammer
523729d3fc
api(App): Adds version_about method to App.
...
Version about text is now customizable and propagates to subcommands. Closes #1640 .
2020-09-25 09:06:35 -04:00
pretzelhammer
33caf49793
api(App): Adds help_about method to App.
...
Help about text is now customizable and propagates to subcommands. Closes #2080 .
2020-09-24 17:53:02 -04:00
Pavan Kumar Sunkara
99b8830d0b
Remove unneeded cfg_attr
2020-09-24 13:51:02 +02:00
bors[bot]
03c11607b5
Merge #2132
...
2132: Add missing links in docs. r=pksunkara a=newAM
Co-authored-by: Alex M <alexmgit@protonmail.com>
2020-09-12 18:28:23 +00:00
Alex M
96db338697
Add missing links in docs.
2020-09-12 10:15:14 -07:00
Alex M
3758725dc2
Fix for issue #2130 .
2020-09-12 09:52:52 -07:00
Pavan Kumar Sunkara
55abd639f7
Rename get_*_no_heading to get_*_with_no_heading
2020-08-29 11:49:04 +02:00
Pavan Kumar Sunkara
9e381f92a9
Rename required_unless_eq_* to required_unless_present_*
2020-08-29 11:48:35 +02:00
bors[bot]
e4b5407296
Merge #1976 #2073
...
1976: Refactor r=pksunkara a=CreepySkeleton
2073: Add new "regex" feature r=CreepySkeleton a=bkaestner
Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
Co-authored-by: Benjamin Kästner <benjamin.kaestner@gmail.com>
2020-08-28 17:14:31 +00:00
CreepySkeleton
5020333037
Refactor coloring
2020-08-28 19:21:05 +03:00
Benjamin Kästner
cde1a2d218
regex: Introduce convenience Cow-wrapper RegexRef
...
As previously discussed on [GitHub], this commit introduces a Cow-like
wrapper RegexRef to enable both `Regex` as well as `&Regex` as
arguments.
It also introduces a new module in the `build:arg` path to remove
clutter from the main module. For more information see #2073 .
[GitHub]: https://github.com/clap-rs/clap/pull/2073#issuecomment-674442310
2020-08-26 17:54:54 +02:00
Benjamin Kästner
8cb9a7d486
Add new "regex" feature
...
This commit introduces a new feature called `"regex"`. It adds a new
function `validator_regex` to `Arg` and was inspired by the discussion
in #1968 . The name `validator_regex` was chosen instead of
`regex_validator` to make sure that the developer keeps in mind that
there may only be a single `Validator` on an `Arg`.
The feature can be used with YAML files, however there is no proper
pattern in `clap_app!` (yet).
2020-08-26 17:54:54 +02:00
bors[bot]
29df5c2d16
Merge #2100 #2106
...
2100: Allow for nested subcommands with ZSH generation. r=pksunkara a=newAM
2106: Update the env var example for derive r=pksunkara a=rgreinho
Co-authored-by: Alex M <alexmgit@protonmail.com>
Co-authored-by: Rémy Greinhofer <remy.greinhofer@gmail.com>
2020-08-24 06:45:45 +00:00
bors[bot]
7853903052
Merge #2102
...
2102: Fix propagation r=pksunkara a=CreepySkeleton
Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-08-24 06:22:27 +00:00
CreepySkeleton
1cd069090e
Fix propagation
2020-08-23 20:56:29 +03:00
Alex M
60dfcf13b5
Allow for nested subcommands with ZSH generation.
2020-08-23 09:33:29 -07:00
Simon Morgan
2e973a2649
Fix a few documentation typos
2020-08-22 16:49:09 +01:00
bors[bot]
1e3d53fd1f
Merge #2081
...
2081: Polish doc comments for App r=CreepySkeleton a=mkantor
Co-authored-by: Matt Kantor <the.matt.kantor@gmail.com>
2020-08-17 20:56:13 +00:00
Matt Kantor
f6e28c5ff0
Remove doc mention of no-longer-existing from_yaml method.
2020-08-17 12:54:24 -07:00
Matt Kantor
494fddd06e
Polish doc comments for App.
...
- Fix some links.
- Make the punctuation consistent.
- Correct some spelling/grammar mistakes.
2020-08-17 11:00:00 -07:00
CreepySkeleton
f4fb9db65c
cargo fmt
2020-08-16 00:29:30 +03:00
CreepySkeleton
0b2eac4da7
Fix yaml support
2020-08-15 23:42:23 +03:00
CreepySkeleton
ce3171ace5
Arg::required_unless_all => required_unless_eq_all
2020-08-15 20:38:57 +03:00
CreepySkeleton
b12102c832
Arg::required_unless -> required_unless_present
2020-08-15 20:38:56 +03:00
CreepySkeleton
55dceca819
Improve documentation
2020-08-15 20:38:56 +03:00
CreepySkeleton
233af6e7a1
Arg::required_if => required_if_eq
2020-08-15 20:38:55 +03:00
CreepySkeleton
8b85c4ecea
Arg::required_ifs => required_if_eq_any
2020-08-15 20:38:12 +03:00
CreepySkeleton
6b6b6035ed
Arg::required_unless_one => required_unless_eq_any
2020-08-15 20:38:11 +03:00
bors[bot]
26aa746c3a
Merge #2067
...
2067: Use a template to produce the default help message r=pksunkara a=mkantor
Co-authored-by: Matt Kantor <the.matt.kantor@gmail.com>
2020-08-14 23:42:38 +00:00
Matt Kantor
85d3daa8c1
Use a different default template when there are no args.
...
This eliminates extraneous empty lines when there are no user-defined
args, the default args are disabled, and `after_help` is set.
2020-08-14 14:02:52 -07:00
Benjamin Kästner
2b101ad7e5
Properly handle YAML null macros for default_value_if
...
The macro `yaml_opt_str` is only used in `yaml_tuple3`, which again is
only used for `default_value_if`. Unfortunately, the current test
doesn't make sense, as a v.is_null() indicates a Yaml::Null, on wich
`as_str()` always returns `None`. Instead, the condition should be
negated, as the documentation of `default_value_if` hints:
> **NOTE:** If using YAML the values should be laid out as
> follows (`None` can be represented as `null` in YAML)
The case `$v.is_null()` should therefore lead to `None`, whereas all
other cases should be interpreted `as_str()`.
2020-08-14 18:28:43 +02:00
Matt Kantor
2c91800099
Restore details to doc comment for help_template.
2020-08-14 09:27:42 -07:00
Matt Kantor
059503e54d
Make {before-help} and {after-help} template tags include padding.
...
Previously there were separate tags for this, {before-help-padded} and
{after-help-padded}. Those have been removed and the default ones
given their behavior.
2020-08-14 09:14:10 -07:00
Matt Kantor
a87320ae88
Use a template to produce the default help message.
...
This makes some changes to the template system:
- Template tags for optional items (like {author}) now expand to
nothing when the value is unset instead of a default string (like
"unknown author").
- Many template tags now emit line-wrapped output to match
write_default_help.
- Items with long variants now expand to the appropriate thing for -h
vs --help.
- The now-obsolete {long-about} tag has been removed.
- A few new tags have been added.
These are externally-visible changes, but if this makes it into 3.0
that's probably reasonable?
Note that line-wrapping can have some odd edge cases since it does not
account for preceding/trailing characters on the same line as the tag.
This is already the case in master, but will affect some additional
tags with this changeset. See #2065 for details.
Closes #2002 .
2020-08-13 17:52:48 -07:00
bors[bot]
ca6c84fa8a
Merge #1961
...
1961: V3 docs r=CreepySkeleton a=pksunkara
Co-authored-by: Kevin K <kbknapp@gmail.com>
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-08-12 14:58:09 +00:00
bors[bot]
2df656c98d
Merge #1998
...
1998: Relax some restrictions on validators r=pksunkara a=CreepySkeleton
Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-08-12 14:35:39 +00:00
Pavan Kumar Sunkara
c2e3b719ae
Apply suggestions from code review
...
Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-08-12 15:50:15 +02:00
CreepySkeleton
39fadbf7c8
Rebase
2020-08-12 16:40:19 +03:00
CreepySkeleton
32414fbdff
Fix and rearrange debug asserts
2020-08-12 06:12:42 +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
Matt Kantor
0d8ebeb36b
Fix doc comment for Arg::long_about.
2020-08-11 15:30:30 -07: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
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
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
e9759a241b
Adjust examples and tests
2020-08-05 17:07:13 +03:00
Nicholas Nethercote
7fb397d905
refactor: Simplify some it.any(...)
calls.
2020-07-29 10:35:34 +10: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
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
Blaxar Waldarax
748aea39f3
feat: Added {before/after}_help_long to App struct, closed #1903
2020-07-19 13:59:53 +02: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
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
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
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
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
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
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
CreepySkeleton
7e8d120543
Make getters return iterators rather than slices
2020-07-06 17:33:02 +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
CreepySkeleton
a3206197ff
cargo clippy + fmt
2020-06-27 04:30:02 +03:00
CreepySkeleton
f904bebd9a
Ditch find_subcnd*! and match_alias!
2020-06-27 04:30:02 +03:00
CreepySkeleton
f143b2f70e
Ditch names! and sc_names!
2020-06-27 04:30:02 +03:00
CreepySkeleton
270fd55f60
Ditch groups_for_arg!
2020-06-27 04:30:02 +03:00
CreepySkeleton
b7be22e90b
Ditch opts! and positionals!
2020-06-27 04:30:01 +03:00