bors[bot]
b835ce9061
Merge #2817
...
2817: Add support for Multicall executables as subcommands with a Multicall setting r=pksunkara a=fishface60
Co-authored-by: Richard Maw <richard.maw@gmail.com>
2021-10-16 00:32:52 +00:00
Richard Maw
694329b363
fixup! Make hostname a non-derive example and rename via Cargo.toml
2021-10-12 22:38:43 +01:00
Richard Maw
b2180e9d72
fixup! Gate Multicall behind unstable feature
2021-10-12 20:35:59 +01:00
Richard Maw
a31d3b288d
fixup! Revert: Make hostname a non-derive example and rename via Cargo.toml
...
tests/examples.rs:examples_are_functional finds examples by stripping
`.rs` off the basename
2021-10-12 20:01:59 +01:00
Richard Maw
1782f9d4ec
fixup! Make hostname a non-derive example and rename via Cargo.toml
2021-10-12 19:57:32 +01:00
Ed Page
a61752a5d5
chore: Include fig in testing
2021-10-12 11:25:17 -05:00
Ed Page
dfbeb71077
fix: Gate App::replace
...
We are concerned about the level of polish of this feature and are
unsure enough about its future, we've decided to gate it to unblock the
v3 release.
2021-10-09 10:49:10 -05:00
bors[bot]
5afa640e3b
Merge #2834
...
2834: fix: Allow unicode-aware case insensitivity with ArgValue r=pksunkara a=epage
Co-authored-by: Ed Page <eopage@gmail.com>
2021-10-09 12:37:33 +00:00
Ed Page
56a6a7418e
fix: Allow unicode-aware case insensitivity with ArgValue
...
This also opens us up to being more unicode aware in other places, like
our sorting of arguments in the help.
Fixes #2792
2021-10-09 07:21:45 -05:00
Ed Page
2bbe9123ee
fix!: Generalize unicode feature
...
This flag was added in v3. This will allow us to put more related
functionality behind it.
BREAKING CHANGE: `unicode_help` was renamed to `unicode`.
2021-10-09 06:27:28 -05:00
Ed Page
8546f0e348
Merge pull request #2828 from grant0417/master
...
feat(generate): Add fig autocomplete generator
2021-10-09 05:10:22 -05:00
grant0417
c3b8a96d65
Refactored fig generation code to crate
2021-10-07 20:54:14 -04:00
Ed Page
7b5a4c9c2d
feat: Add backtraces to errors
...
This is gated behind the `debug` feature flag so only explicit debugging
cases pay the build time and runtime costs.
The builder API's stack traces are generally not too interesting. Where
this really helps is with `clap_derive`. We currently panic on
unexpected conditions which at least gives us a backtrace. We'd like to
turn these into errors but to do so would lose those debuggin
backtraces, which is where this comes in.
This is a part of #2255
2021-10-07 10:02:34 -05:00
Ed Page
b3847b76c4
refactor: Remove vec_map dependency
...
Doesn't look like this dependency is buying us anything at this point,
so removing it.
2021-09-17 15:14:49 -05:00
dylni
dc65513966
Replace ArgStr
with os_str_bytes::RawOsStr
2021-08-29 10:00:30 -04:00
Donough Liu
b1d364a228
Pin clap_derive
version ( #2706 )
...
* Pin clap_derive version
* Pin clap version in clap_generate
2021-08-17 08:43:37 +00:00
Pavan Kumar Sunkara
52be134949
Release 3.0.0-beta.4
...
clap@3.0.0-beta.4
clap_derive@3.0.0-beta.4
clap_generate@3.0.0-beta.4
Generated by cargo-workspaces
2021-08-14 23:40:49 +01:00
Pavan Kumar Sunkara
73b28fb104
Release 3.0.0-beta.3
...
clap@3.0.0-beta.3
clap_derive@3.0.0-beta.3
clap_generate@3.0.0-beta.3
Generated by cargo-workspaces
2021-08-14 23:01:13 +01:00
Pavan Kumar Sunkara
c7985fb73e
Add env feature gate
2021-08-14 01:55:05 +01:00
Pavan Kumar Sunkara
6994be4f15
Remove doc feature
2021-07-30 22:49:11 +01:00
Rémi Lauzier
48147d680b
Update dependency that need no change
2021-06-17 13:58:40 -04:00
Pavan Kumar Sunkara
cedd110f10
Solve indexmap issue on WSL in ubuntu
2021-06-16 02:27:49 +01:00
Pavan Kumar Sunkara
94ce18c399
Update badges
2021-05-25 23:19:32 +01:00
Pavan Kumar Sunkara
49954c28ad
Remove unstable feature flag
2021-03-13 11:40:56 +05:30
dylni
8a6881169b
Upgrade os_str_bytes
2021-03-01 17:58:53 -05:00
Martin Geisler
df7a8c1282
feat: remove direct unicode-width dependency
...
This removes the direct dependency on unicode-width and delegates the
complexity of computing the displayed width of text to the Textwrap
crate.
The `display_width` function handles characters like “æøå” (Danish),
“äöü” (German), and “😂 ✨ 😍 ” (emojis) – even if the unicode-width
Cargo feature is disabled.
This is an improvement of the former `str_width` function which would
over-estimate the width of emojis and non-ASCII characters (since they
are several bytes wide).
2021-02-20 20:56:15 +01:00
ldm0
a684e9a51d
Bump version-sync version
2021-02-14 09:51:23 +00:00
Donough Liu
c6da968ec7
Bump textwrap to 0.13.2
2021-01-02 13:15:50 +08:00
Pavan Kumar Sunkara
469aacda7e
Move more to github ci
2020-11-06 21:02:06 +01:00
Pavan Kumar Sunkara
d881a1185b
Release 3.0.0-beta.2
...
clap@3.0.0-beta.2
clap_derive@3.0.0-beta.2
clap_generate@3.0.0-beta.2
Generated by cargo-workspaces
2020-09-18 20:32:41 +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
Pavan Kumar Sunkara
cfd1826052
Update changelog and upgrader
2020-08-28 17:27:47 +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
CreepySkeleton
fd1ee7872e
Make caching in crate_authors! actually work
2020-08-21 08:21:21 +03:00
Pavan Kumar Sunkara
e68ec35a90
Move to terminal_size dep after the recent textwrap upgrade
2020-07-01 09:46:10 +02:00
Sebastian Dröge
1061354f17
Update to textwrap 0.12
2020-06-30 10:56:25 +03:00
Pavan Kumar Sunkara
b562ce4d63
Some modifications to allow cargo verification to work
2020-05-03 11:48:01 +02:00
dylni
99096ecbe9
Handle more edge cases for an ArgStr
prefix
2020-05-01 18:19:40 -04:00
CreepySkeleton
20dab85143
Bump os_str_bytes in order to support wasi
2020-04-27 20:36:14 +03:00
Pavan Kumar Sunkara
910209fb05
Update Cargo.toml
2020-04-26 18:53:50 +02:00
Pavan Kumar Sunkara
74a7eed123
Update criterion away from fork
2020-04-26 16:12:04 +02:00
CreepySkeleton
739e7048a5
Make vec_map required dependency - in fact, it already is
2020-04-24 15:33:11 +03:00
dylni
c2246cf03f
imp(src/util/osstringext.rs): Remove the last unsafe block
2020-04-23 09:02:10 -04:00
Pavan Kumar Sunkara
abc2ada63f
Use github actions for windows
2020-04-21 00:16:32 +02:00
Pavan Kumar Sunkara
9d5de69249
Update Cargo.toml
2020-04-20 16:11:30 +02:00
Pavan Kumar Sunkara
070bd50b28
Finished color refactor
2020-04-16 12:51:26 +02:00
Pavan Kumar Sunkara
3bb8389c73
Enable ansi support for windows before refactoring
2020-04-12 10:20:08 +02:00
Pavan Kumar Sunkara
b45746feff
Remove some defaults from profiles
2020-04-10 17:19:26 +02:00
Pavan Kumar Sunkara
2385ff8621
Coverage is now working
2020-04-10 15:26:41 +02:00
Pavan Kumar Sunkara
cceb29623a
Remove nightly feature
2020-04-10 10:42:25 +02:00
CreepySkeleton
ee7ee9ba9f
Select a single docs.rs build target
2020-03-20 03:02:39 +03:00
Pavan Kumar Sunkara
eaae1202cb
Basic github action for benchmarking
2020-03-05 09:21:39 +01:00
CreepySkeleton
d466a56aa1
Fix benches
2020-03-04 21:31:18 +03:00
Pavan Kumar Sunkara
47782cfac6
Make cargo feature additive
2020-03-01 22:55:57 +01:00
CreepySkeleton
8ca1c22981
Good names for CI + cleanup
2020-02-21 18:21:32 +03:00
CreepySkeleton
9d1cf49ca8
Move to criterion
2020-02-21 18:21:31 +03:00
Pavan Kumar Sunkara
970d7140a3
Use 'Clap Maintainers' as authors
2020-02-10 20:16:25 +01:00
Pavan Kumar Sunkara
33f47acc67
Refactor clap_generate
2020-02-07 07:52:04 +01:00
bors[bot]
509ac33a20
Merge #1664
...
1664: Import structopt r=pksunkara a=CreepySkeleton
OK, here is about 50% of what's left to import.
`impl StructOpt for Box<impl StructOpt>` is not imported because layouts of `StructOpt` and `Clap` are too different. I'll work it out after the import is done.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/clap-rs/clap/1664 )
<!-- Reviewable:end -->
Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
Co-authored-by: David McNeil <mcneil.david2@gmail.com>
2020-02-05 08:43:57 +00:00
Pavan Kumar Sunkara
49f096dab2
Use workspace.default-members
2020-02-04 09:41:05 +01:00
CreepySkeleton
cf11d46373
Default value for default_value
(yeah, sounds awkward)
2020-02-04 11:40:01 +03:00
Pavan Kumar Sunkara
4d2c8ffa6b
Update Cargo.toml files
2020-02-04 09:11:33 +01:00
Dylan DPC
a2ff3fa91b
Revert " imp: Add exitcode::USAGE exit code as suggested in #1327 "
2020-02-03 12:37:37 +01:00
Pavan Kumar Sunkara
6c338e42d0
Faster CI
2020-02-03 03:57:52 +01:00
Dylan DPC
6aaeb2718b
Update Cargo.toml
2020-02-02 01:28:19 +01:00
nazarov A. V
dc4d2faf76
Update yaml-rust to 0.4.3
2020-02-01 14:45:52 +03:00
CreepySkeleton
8be0a94951
Merge pull request #1638 from pksunkara/derive
...
Subtree merge clap_derive into this repo
2020-01-31 02:28:58 +03:00
Pavan Kumar Sunkara
7e0d820aa6
Run clap_derive tests in CI
2020-01-18 19:04:11 +05:30
Daniel Gray
a1445b0f3b
imp: Add exitcode::USAGE exit code as suggested in #1327
...
The reason to do this is described well in issue #1327 . It is also a
recommendation of the Rust book itself:
https://rust-cli.github.io/book/in-depth/exit-code.html
2020-01-17 11:20:45 -04:00
dylan_DPC
a2f9fb5f6c
update bitflag to avoid cant find macro import on lower (1.0) versions
2019-11-30 02:06:52 +01:00
Dylan DPC
dd6c8e08ad
use 2018 edition and minor refactors
2019-11-11 12:54:55 +01:00
Razican
4f97d51f1e
Upgraded ansi_term dependency
2019-10-31 09:05:47 +01:00
Bastien Orivel
ece3f66e0f
Update strsim to 0.9
2019-08-25 13:03:03 +02:00
Erick Tryzelaar
2664703587
Fix most warnings
...
This patch:
* Removes unused `App::contains_long`
* Removes `std::ascii::AsciiExt` (deprecated in 1.26)
* Replaces `trim_left_matches` with `trim_start_matches` (added in 1.30)
* Adds `dyn` (added in 1.27)
* Removes unused `mkeymap::KeyType::{is_short,is_long}`
* Cleans up unused imports
2019-06-19 15:47:50 -07:00
Kevin K
0568dbd741
Merge pull request #1442 from arjunkathuria/v3-master
...
chore: bump the version for textwrap crate from 0.10 to 0.11
2019-04-05 21:15:32 -04:00
Kevin K
573b0a9e88
chore: upgrades to 2018 edition of Rust
2019-04-05 20:21:30 -04:00
Kevin K
3dffd4908c
Removing the lint
features and invoking cargo clippy
manually instead
2019-04-04 13:27:08 -04:00
Kevin K
d2fbc41060
Cargo.toml: Fix typos in description
2019-04-04 13:22:29 -04:00
Arjun Kathuria
fe2ef36112
chore: bump the version for textwrap crate from 0.10 to 0.11
2019-03-30 09:11:47 +05:30
Kevin K
9399174416
perf: trims down some macro usage
2018-11-14 21:04:15 -05:00
Kevin K
7accb93f46
chore: removes clippy dep in favor of cargo clippy
2018-11-14 16:06:20 -05:00
Kevin K
95f949efb0
chore: updates strsim dep
2018-11-14 16:06:07 -05:00
Kevin K
2a480451d3
refactor: clippy run
2018-11-14 14:01:48 -05:00
Kevin K
8dd7783cf3
chore: increase version
2018-10-20 21:55:03 -04:00
Kevin K
0f4096b3d4
imp: let users decide on codegen units and LTO
2018-10-19 23:36:22 -04:00
Kevin K
a769639f8b
chore: prepares for the move to clap-rs org
2018-08-01 23:06:12 -04:00
Kevin K
94e0d38c2d
chore: makes clap_derive a git dependency
2018-07-23 15:51:57 -04:00
Kevin K
ab8c97e3f1
chore: relicense under MIT and APACHE 2.0
2018-07-23 14:25:18 -04:00
Kevin K
53b2ca51f4
refactor(Derives): changes the derive traits for the clap_derive crate
2018-07-13 11:36:53 -04:00
Dylan DPC
580ad94df2
fixed typo for coveralls key
2018-06-26 21:19:02 -04:00
Alan K
8a7ac8f543
imp(yaml): Updated yaml-rust to 0.4
...
Closes #747 , #1110
2018-06-22 13:32:13 +02:00
Kevin K
b033bb5abc
chore: ordermap to indexmap
2018-06-12 10:22:18 -04:00
Kevin K
b7e38fb62a
chore: update deps
2018-06-12 10:18:16 -04:00
Kevin K
c010a9d445
chore: removes doc profile
2018-06-12 10:10:03 -04:00
Matthias Krüger
1e3c715c47
Cargo.toml: use codegen-units = 1 in release and bench profiles.
2018-03-19 17:12:02 -04:00
Will Murphy
74421bb8b7
bump version on term size to 1.0.0-beta1
2018-03-06 06:36:59 -05:00
Kevin K
6971624428
imp(Deps): doesnt compile ansi_term on Windows since its not used
...
Before this commit, ansi_term was compiled anytime the `color` feature
was used. However, on Windows the `color` feature is ignored. Even so
ansi_term was compiled, and just not used. This commit fixes that by
only compiling ansi_term on non-Windows targets. Thanks to @retep998 for
the gudiance.
Closes #1155
2018-02-13 15:43:45 -05:00
Kevin K
e1b10f60aa
chore(Cargo.toml): updates with new excludes to trim package and new badges for crates.io
2018-02-05 16:23:00 -05:00
Kevin K
6a8b301fa4
chore: bumps the Cargo.toml version to 3.0.0-alpha1 to reduce confusion
2018-02-03 15:15:00 -05:00
Kevin K
7673dfc085
perf: refactors the POSIX override handling to lazy handling
...
This commit primarily changes to a lazy handling of POSIX overrides by
relying on github.com/bluss/ordermap instead of the old HashMap impl.
The ordermap allows us to keep track of which arguments arrived first,
and therefore determine which ones should be removed when an override
conflict is found.
This has the added benefit of we no longer have to do the bookkeeping to
keep track and override args as they come in, we can do it once at the
end.
Finally, ordermap allows fast Vec like iteration of the keys, which we
end up doing several times. Benching is still TBD once the v3 prep is
done, but this change should have a meaningful impact.
2018-01-25 15:08:57 -05:00