Commit graph

2781 commits

Author SHA1 Message Date
Stéphane Campinas
15ad5954b0
feat(Error): add a cause field to the Error struct
The cause field is the actual error described in the message field,
however without extra information like usage.

Close #861
2019-11-02 21:36:11 +01:00
Sergey "Shnatsel" Davidoff
0a010a4371 Add comment on performance 2019-11-02 21:03:35 +01:00
Sergey "Shnatsel" Davidoff
925956d594 Do not leak a new string on every invocation of crate_authors! 2019-11-02 20:18:57 +01:00
Sergey "Shnatsel" Davidoff
0085bb7ee2 Make code actually work 2019-11-02 19:48:16 +01:00
Sergey "Shnatsel" Davidoff
63829a2a9f Drop unnecessary unsafe 2019-11-02 18:33:17 +01:00
Dylan DPC
85f820fa04
Merge pull request #1592 from Razican/term_update
Upgraded ansi_term dependency
2019-10-31 17:06:27 +01:00
Razican
4f97d51f1e
Upgraded ansi_term dependency 2019-10-31 09:05:47 +01:00
Kevin K
2af7c7ca34
Merge pull request #1591 from clap-rs/issue-1589
fixes the custom derive example in the readme
2019-10-30 21:54:37 -04:00
Kevin K
9d58bbee24
docs(README.md): fixes the custom derive example in the readme
Closes #1589
2019-10-30 20:30:29 -04:00
Kevin K
269a5d2bb6
Merge pull request #1523 from shua/master
imp(macros): add subcommand expr macro
2019-10-30 20:29:52 -04:00
Kevin K
c3eca6cdd7
Merge pull request #1588 from lucab/ups/parser-quote-name-v3
app: quote field names in errors
2019-10-30 20:28:39 -04:00
Kevin K
04a3faa39b
Merge branch 'master' into ups/parser-quote-name-v3 2019-10-30 18:31:31 -04:00
Kevin K
cd76c9a146
Merge branch 'master' into master 2019-10-30 18:31:03 -04:00
Kevin K
7f046f28ab
Merge pull request #1590 from clap-rs/msrv-1.36
Msrv 1.36
2019-10-30 18:30:44 -04:00
Kevin K
85eba760e4
chore: adds a meta tag for clog 2019-10-30 16:57:06 -04:00
Kevin K
98e8cfe0c4
meta: Bump the minimum supported Rust to 1.36 2019-10-30 16:56:27 -04:00
Dylan DPC
5318342112
Update README.md 2019-10-30 10:28:37 +01:00
Luca BRUNO
d74e0646d2
app: quote field names in errors
This quotes all field names in errors. It makes easier for humans to
disambiguate common network-related cases which currently end up in
messages like "address is already in use".
2019-10-30 08:30:10 +00:00
shua
452b80d334 add subcommand expr macro 2019-10-30 00:22:05 -04:00
Kevin K
4fdca7b4e6
docs: corrects notes about v2 vs v3 branches 2019-10-29 22:30:17 -04:00
Kevin K
1cc872b369
Rename assert_cli to assert_cmd 2019-10-29 22:25:22 -04:00
Dylan DPC
655f4262dd
Add note for 3.0 release (#1503) 2019-10-29 22:24:52 -04:00
Daniel José Domingos Serrano
59c3233a45
Fix yaml docs 2019-10-29 21:49:00 -04:00
Brian Foley
56d182d98b
Qualify all names in bodies of exported macros with $crate::
The lack of qualification caused odd errors such as:

```
use clap;
let foo = clap::value_t!(matches.value_of("foo"),i u32).unwrap(); # OK
lot bar = clap::value_t!(matches, "bar", u32).unwrap(); # Compile fail
```

but

```
use clap::value_t;
let foo = value_t!(matches.value_of("foo"),i u32).unwrap(); # OK
lot bar = value_t!(matches, "bar", u32).unwrap(); # OK
```
2019-10-29 21:48:49 -04:00
Thiago Arrais
c3b7c01f54
Provide default_values mimicking default_value 2019-10-29 21:48:10 -04:00
Za Wilcox
fed3a8fc29
where -> were 2019-10-29 21:47:51 -04:00
Za Wilcox
14bfbd6ef4
add missing 'the' 2019-10-29 21:47:42 -04:00
Kevin K
c91d523d41
cargo clippy & rustfmt 2019-10-29 21:47:32 -04:00
Oleksii Filonenko
1e39967044
Fix some clippy lints
- Manually fix some problems
- Run 'cargo fix --clippy'

Commits taken from similar PRs open at that time:

- Replace indexmap remove with swap_remove
  Resolves #1562 and closes #1563
- Use cognitive_complexity for clippy lint
  Resolves #1564 and closes #1565
- Replace deprecated trim_left_matches with trim_start_matches
  Closes #1539

Co-authored-by: Antoine Martin <antoine97.martin@gmail.com>
Co-authored-by: Brian Foley <bpfoley@users.noreply.github.com>
2019-10-29 21:46:25 -04:00
fvkramer
4e1da91fb1
examples: Change flag arg to option arg
Comments in 04_using_matches.rs list the config arg
as an optional arg. However, -c --config is currently
a flag arg. This commit sets takes_value to true on
the config arg to make it an "option" argument.
2019-10-29 21:45:58 -04:00
Sascha Grunert
b6ebdba2e1
Fix opts variable name in README.md 2019-10-29 21:45:47 -04:00
Tobias Kunze
ed69a688ff
Fix some typos in the docs 2019-10-29 21:45:09 -04:00
Oleksii Filonenko
1906c504ea
Replace ONCE_INIT with Once::new()
Deprecated since 1.38.0
2019-10-29 21:44:38 -04:00
Yuki Okushi
e56b80b316
Fix license badge on README 2019-10-29 21:44:20 -04:00
Tshepang Lekhonkhobe
a720de3f24
typo 2019-10-29 21:44:01 -04:00
Yuki Okushi
28a3abdd16
chore: fix cache issue on Travis 2019-10-29 21:43:04 -04:00
Ricky
dfbbf863c1
Added unreachable pub attribute to the parsing functions 2019-10-23 19:10:07 -04:00
Dylan DPC
57cb4d2f83
Merge pull request #1525 from demoray/patch-1
use std::sync::Once::new() rather than ONCE_INIT
2019-10-21 08:30:46 +02:00
Ricky
4e732000de
Adding pub to the parse functions 2019-10-18 15:50:55 -04:00
Dylan DPC
4a46684b1c
Merge pull request #20 from pksunkara/no-default-about
refactor: Do not use cargo description as default
2019-10-12 21:17:36 +02:00
Pavan Kumar Sunkara
6b2f870c34 refactor: Do not use cargo description as default 2019-10-12 10:10:24 +02:00
Pavan Kumar Sunkara
a829ad08ac test: Get 'cargo test' working with clap v3 (#18) 2019-10-11 17:04:24 +02:00
Pavan Kumar Sunkara
727ab1b82c Fix for clap changes in lifetimes, subcommand and get_matches_* (#16) 2019-09-17 08:26:01 +02:00
Dylan DPC
398b9dc6cc
Merge pull request #1534 from Eijebong/strsim
Update strsim to 0.9
2019-08-26 14:25:02 +02:00
Bastien Orivel
ece3f66e0f Update strsim to 0.9 2019-08-25 13:03:03 +02:00
Dylan DPC
ee808f464f
Update 17_yaml.yml 2019-07-25 12:14:05 +02:00
demoray
7f835ed24d
use std::sync::Once::new() rather than ONCE_INIT
Updated to v3-master per discussion on #1521
2019-07-23 10:03:07 -04:00
Dylan DPC
180b6b82de
Merge pull request #1520 from nootanghimire/style/add-newline-after-printing-help
style(help): add newline after writing help
2019-07-23 12:35:19 +02:00
Nootan Ghimire
a87284020f
style(help): add newline after writing help 2019-07-17 10:44:14 +10:00
Dylan DPC
eb6276c772
Merge pull request #1514 from rharriso/pattern-arg-suggestion
Pattern arg suggestion
2019-07-04 15:33:53 +02:00