Donough Liu
6968f340c3
Fix clippy warnings
2021-01-19 02:24:58 +08:00
Pavan Kumar Sunkara
50fb4ca63d
Merge pull request #2286 from jder/non-structopt-usage
...
docs: add back example of using non-structopt arguments
2021-01-03 22:04:03 +00:00
Jesse Rusak
c85526bd4e
docs: add back example of using non-structopt arguments
2021-01-03 14:07:22 -05:00
Pavan Kumar Sunkara
eb047b6b1f
Merge pull request #2284 from ldm0/textwrap
...
Add unicode_help feature, Bump textwrap to 0.13.2
2021-01-02 06:11:14 +00:00
Donough Liu
c6da968ec7
Bump textwrap to 0.13.2
2021-01-02 13:15:50 +08:00
Pavan Kumar Sunkara
dc3306c097
Merge pull request #2281 from mgeisler/patch-2
...
docs: Mention correct default value in term_width docstring
2020-12-31 08:38:54 +00:00
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
e3bede211f
Merge pull request #2276 from Nukesor/unify_zsh_help_escaping
...
Fix zsh subcommand help escaping
2020-12-30 13:44:33 +00:00
Pavan Kumar Sunkara
a0269a41d4
Merge pull request #2268 from ldm0/fixme
...
Better mkeymap
2020-12-28 10:09:27 +00:00
Arne Beer
f290a9de72
Code formatting and completion script formatting
2020-12-28 01:41:57 +01:00
Arne Beer
915d60504c
zsh: Test subcommand help text escaping
2020-12-28 01:41:57 +01:00
Arne Beer
9001bf5d21
zsh: Fix subcommand help escaping
2020-12-28 01:41:57 +01:00
Arne Beer
84d99d6bb8
Give each shell test their own App
...
Right now, adjusting test cases to cover some special edge-cases for a
specific shell is a little problematic.
For instance, if you add a special character that needs escaping
to one of the help strings, not only the tests for the shell you're
currently working on need adjustments, but rather all shell tests!
Contributors can often only work on one specific shell. The
need to adjust shells they don't know anything about discourages
testing or makes it simply impossible for a single contributor.
Arguably, this commit introduces a lot of code duplication, but on
the other hand it also makes testing a lot easier.
2020-12-28 01:40:15 +01:00
Pavan Kumar Sunkara
4bb77638b5
Merge pull request #2275 from Nukesor/restructure_tests
...
Put completion tests for different shells in submodules
2020-12-27 20:53:36 +00:00
Arne Beer
6f930379cc
Put completion tests for different shells in submodules
2020-12-27 20:47:30 +01:00
Donough Liu
0f115f18ad
Fix positional count usage
2020-12-27 04:11:30 +08:00
Donough Liu
120e942e7a
Private arg
2020-12-27 01:46:48 +08:00
Donough Liu
2b7fd731ae
Private keys
2020-12-27 01:20:53 +08:00
Pavan Kumar Sunkara
7728000b9c
Merge pull request #2266 from budde25/traits
...
imp: added more common derives App, Arg, and ArgMatches
2020-12-26 17:02:28 +00:00
Donough Liu
f54328ee4c
Cleaner api and better inner documentation
2020-12-27 00:43:49 +08:00
Donough Liu
53fdc9d6b2
Fix clippy
2020-12-26 21:03:21 +08:00
Donough Liu
ad3d3a13cd
KeyType: PartialEq for u64
2020-12-26 21:03:21 +08:00
Donough Liu
b2a066b24f
Resolve a fixme, better code readability
2020-12-26 21:03:21 +08:00
Pavan Kumar Sunkara
db3f10c8c4
Fix CI for i686 ubuntu
2020-12-25 22:09:27 +00:00
budde25
c26d1a4421
imp: added more derives to common App, Arg, and ArgMatches
2020-12-23 17:26:53 -06:00
Pavan Kumar Sunkara
312e4bbbe6
Merge pull request #2265 from budde25/docs
...
docs(arg_matches.rs): clarified unclear behavior for is_present and value_of
2020-12-23 17:45:25 +00:00
budde25
52635f00d4
docs(arg_matches.rs): clarified unclear behavior for is_present and value_of methods
2020-12-23 07:44:19 -06:00
Pavan Kumar Sunkara
74a5a5c5fa
Merge pull request #2258 from nitsky/clap_derive_no_leading_double_colon
...
Use `clap` instead of `::clap` in `clap_derive`
2020-12-17 18:02:26 +00:00
David Yamnitsky
09014258cb
Use clap
instead of ::clap
in clap_derive
2020-12-15 15:20:21 -05: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
Pavan Kumar Sunkara
c4ab996339
Merge pull request #2252 from ldm0/lazy_propagation
...
Lazy propagation and _build cleaning
2020-12-12 16:56:09 +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
Pavan Kumar Sunkara
76effbd8f9
Merge pull request #2251 from ldm0/conflict
...
Fix only one arg printed in multiple required_unless missing situation
2020-12-12 12:18:52 +00:00
Donough Liu
5f5474d803
Fix only one arg printed in multiple required_unless missing situation
2020-12-12 12:57:17 +08:00
Pavan Kumar Sunkara
5b73699825
Merge pull request #2246 from ldm0/lowindexmultiple
...
Remove LowIndexMultiplePositional, stop recalculating positional_count
2020-12-09 18:10:45 +00: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
Pavan Kumar Sunkara
0a91329958
Merge pull request #2144 from robinmoussu/master
...
Automatically read license field from Cargo.toml
2020-12-08 23:56:45 +00:00
Robin Moussu
6898fbde33
Automatically read license field from Cargo.toml
2020-12-09 00:16:19 +01:00
Pavan Kumar Sunkara
5847303148
Merge pull request #2245 from ldm0/msg
...
Fix issue 1794 error message
2020-12-08 17:52:58 +00:00
Donough Liu
d7e2fd6294
Add regression test for issue 1794
2020-12-09 01:13:05 +08:00
Donough Liu
573dc245e6
Fix incorrect error message.
2020-12-09 01:12:58 +08:00
Jonas Platte
041bfda7ca
Fix a typo in the Clap trait docs ( #2243 )
...
* Fix a typo in the Clap trait docs
* Update src/derive.rs
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-12-08 01:40:18 +00:00
Pavan Kumar Sunkara
3520a30b6e
Merge pull request #2232 from Riptide3/fix-readme
...
docs(README.md): remove unused import in "Using Builder Pattern" example
2020-11-29 09:01:22 +00:00
Riptide3
8b631d5db3
docs(README.md): remove unused import in "Using Builder Pattern" example
2020-11-29 16:10:22 +08:00
Pavan Kumar Sunkara
ad9f97f402
Fix ui tests
2020-11-28 19:16:58 +00:00
Pavan Kumar Sunkara
8395822a0b
Merge pull request #2231 from Aaron1011/fix/arg-matches-hygiene
...
Fix hygiene of `arg_matches` parameter
2020-11-28 17:51:53 +00:00
Aaron Hill
6dc8353fe2
Fix hygiene of arg_matches
parameter
...
In the `Clap` derive macro, a function parameter named `arg_matches` is
generated using `quote!` - as a result, this parameter ends up with
call-site hygiene. However, `arg_matches` is written literally within
several `quote_spanned!` blocks, which generate an `arg_matches` token
with the hygiene of whatever span was passed to `quote_spanned!`.
If these two hygienes are different (for example, if the user invokes
the derive macro from a `macro_rules!` macro), then a usage of
`arg_matches` may not resolve to the `arg_matches` parameter definition.
This commit changes the generation of `arg_matches` identifiers to
always use `quote!`, ensuring that they will always be considered the
'same' identifier by Rust.
2020-11-28 12:22:57 -05:00