Commit graph

566 commits

Author SHA1 Message Date
Ed Page
34d856b449 chore: Release 2023-01-13 09:27:31 -06:00
Ed Page
a41ca2edb0 docs: Update changelog 2023-01-13 07:13:28 -06:00
Ed Page
9aa76fa12f docs: Update changelog 2023-01-09 14:03:47 -06:00
Ed Page
ec4ccf005d chore: Release 2022-12-22 13:21:07 -06:00
Ed Page
13fdb839b7 docs: Update changelog 2022-12-22 13:21:00 -06:00
Ed Page
0eccd556ac chore: Release 2022-12-22 12:40:15 -06:00
Ed Page
1e37c25f5e docs: Update changelog 2022-12-22 12:39:31 -06:00
Ed Page
d2d022248b chore: Release 2022-12-20 20:40:55 -06:00
Ed Page
56a0bb624f docs: Update changelog 2022-12-20 20:40:13 -06:00
Ed Page
ad4726378b chore: Release 2022-11-29 06:45:28 -06:00
Ed Page
c3c9099e72 chore: Release 2022-11-28 21:46:18 -06:00
Ed Page
68127614ec docs: Update changelog 2022-11-28 21:46:04 -06:00
Ed Page
3262016c26 chore: Release 2022-11-24 11:40:15 -06:00
Ed Page
757f95b2e9 docs: Update changelog 2022-11-24 11:39:37 -06:00
Ed Page
dd143eed47 fix: Make ArgPredicate non_exhaustive in v5
Didn't want to forget to do this

Inspired by #4487
2022-11-17 09:01:51 -06:00
Ed Page
f8e9211e38 chore: Release 2022-11-16 10:27:26 -06:00
Ed Page
6524416e9e docs: Update changelog 2022-11-16 10:27:20 -06:00
Ed Page
ba32ab87b2 chore: Release 2022-11-15 10:41:16 -06:00
Ed Page
391cd0092d docs: Update changelog 2022-11-15 10:41:09 -06:00
Ed Page
010976c2ff chore: Release 2022-11-14 12:31:29 -06:00
Ed Page
0bafd2f52d docs: Update changelog 2022-11-14 12:31:14 -06:00
Ed Page
95144b7590 chore: Release 2022-11-11 12:47:41 -06:00
Ed Page
20ecae1cb3 docs: Update changelog 2022-11-11 12:47:34 -06:00
Ed Page
6cbe5c4323 chore: Release 2022-11-07 10:47:47 -06:00
Ed Page
d2739c95cf docs: Update changelog 2022-11-07 10:47:40 -06:00
Ed Page
bc457b179f chore: Release 2022-11-07 10:00:35 -06:00
Ed Page
d5c3c13ec2 docs: Update changelog 2022-11-07 10:00:22 -06:00
Ed Page
b4b94af0f8 chore: Release 2022-11-07 06:24:02 -06:00
Ed Page
4ea612c07c docs: Update changelog 2022-11-07 06:23:15 -06:00
Ed Page
7a8cf91aaa chore: Release 2022-11-04 09:49:50 -05:00
Ed Page
5dfeb1e3f9 docs: Update changelog 2022-11-04 09:49:42 -05:00
Ed Page
7e2a1b5d94 chore: Release 2022-10-20 16:58:59 -05:00
Ed Page
3a0f9fe4a2 docs: Update changelog 2022-10-20 16:58:07 -05:00
Ed Page
b9dfbbf7e4 chore: Release 2022-10-18 07:42:32 -05:00
Ed Page
a6c8f6a5bd docs: Update changelog 2022-10-18 07:41:45 -05:00
Ed Page
cbb05d54f8 chore: Release 2022-10-17 19:43:15 -05:00
Ed Page
b77bd0cc6a docs: Update changelog 2022-10-17 19:41:50 -05:00
Ed Page
bd5a6eab3b chore: Release 2022-10-13 14:13:21 -05:00
Ed Page
7eaeed3abd docs: Update changelog 2022-10-13 14:12:56 -05:00
Ed Page
2926824d10 chore: Release 2022-10-12 08:22:25 -05:00
Ed Page
5840d62160 docs: Update changelog 2022-10-12 08:22:14 -05:00
Ed Page
e5a7a65153 chore: Release 2022-10-11 10:43:39 -05:00
Ed Page
3b6ed1a450 docs: Update changelog 2022-10-11 10:43:26 -05:00
Ed Page
a2f2a9ade1 chore: Release 2022-10-10 11:30:55 -05:00
Ed Page
d821d2f193 docs: Update changelog 2022-10-10 11:30:46 -05:00
Ed Page
ec3fdc4a42 chore: Release 2022-10-08 19:58:26 -05:00
Ed Page
ec57becef6 docs: Update changelog 2022-10-08 19:58:13 -05:00
Ed Page
af1234a0c2 chore: Release 2022-10-05 16:51:33 -05:00
Ed Page
f921281f42 docs: Update changelog 2022-10-05 16:50:59 -05:00
Nihaal Sangha
aa5269d8d0
docs: Add missing backtick in changelog 2022-10-03 23:08:08 +00:00
Ed Page
1d533bb31f chore: Release 2022-10-03 16:20:14 -05:00
Ed Page
46c96df187 docs: Update changelog 2022-10-03 16:19:58 -05:00
Ed Page
261fb792a4 chore: Release 2022-10-01 13:54:19 -05:00
Ed Page
56f4ef7b80 docs: Update changelog 2022-10-01 13:52:40 -05:00
Ed Page
0bea4f252b chore: Release 2022-09-30 14:08:59 -05:00
Ed Page
b654130b14 docs: Update changelog 2022-09-30 14:08:49 -05:00
Ed Page
49186a5930 docs: Note the move in ErrorKind
This was supposed to be captured by a deprecation but
- We missed the deprecation on that line
- I think I've run into issues with deprecations not applying to `use`
2022-09-30 13:24:46 -05:00
Ed Page
e9c7ee4f5f docs: Add missing short help entry to changelog 2022-09-30 13:08:10 -05:00
Ed Page
470140f41e chore: Release 2022-09-30 09:31:51 -05:00
Ed Page
2780a875f0 docs: Update changelog 2022-09-30 09:31:38 -05:00
Ed Page
2912a6436f chore: Release 2022-09-30 08:16:12 -05:00
Ed Page
9f30493e5f chore: Release 2022-09-29 10:08:12 -05:00
Ed Page
5cab144f72 docs: Update changelog 2022-09-29 10:08:04 -05:00
Ed Page
337a9e089b chore: Release 2022-09-29 09:27:13 -05:00
Ed Page
d25d5b696d docs: Update changelog 2022-09-29 09:27:06 -05:00
Ed Page
4524127704 chore: Release 2022-09-28 17:02:08 -05:00
Ed Page
d279f7f4e6 docs: Update changelog 2022-09-28 17:01:56 -05:00
Ed Page
f6602c573c chore: Release 2022-09-28 14:51:22 -05:00
Ed Page
1e171cfef6 docs: Update changelog 2022-09-28 14:47:24 -05:00
Ed Page
3a74d82376 chore: Release 2022-09-28 12:00:48 -05:00
Ed Page
a0c8c7dbd5 docs: Clean up StyledStr entries 2022-09-26 13:51:56 -05:00
Ed Page
9bccded7ed fix(parser): Conflict-with-self is back on by default
See #4261 for more details
2022-09-26 13:29:48 -05:00
Ed Page
3c9bca5ead fix(help)!: Wrapping is behind wrap_help
If users don't want `wrap_help` feature, they can put newlines in where
needed.  Seems odd to support wrapping when the wrap size is fixed.  For
those hard coding the lines, this will save them a decent amount of
size.
2022-09-26 11:45:44 -05:00
Ed Page
2f93c1790f docs: Help migrate with default features 2022-09-26 11:11:55 -05:00
Ed Page
3772bdf041 docs: Update changelog 2022-09-26 11:08:59 -05:00
Ed Page
037b07577c feat: Expose ANSI styling to the user
This gives users the control over where clap outputs while still getting
colors.  For users who want to support old windows versions, check out
`fwdansi` crate.
2022-09-22 09:59:42 -05:00
Ed Page
a2272a2c50 feat(error): Add a 'render' method 2022-09-22 09:55:11 -05:00
Ed Page
4280fdfcbd fix(help): Replace help writers with renderers
The writer is less convenient and isn't offering any performance
benefits of avoidign the extra allocations, so let's render instead.

This supersedes #3874

Fixes #3873
2022-09-22 09:54:19 -05:00
Ed Page
652e71d616 fix(help)!: Provide styled usage to user
This will open us up to providing the user with access to the styled
version in the future.
2022-09-22 09:54:19 -05:00
Steven Tang
e5ced8bae6
docs: Changelog - error-context, help, usage flags 2022-09-22 21:11:19 +10:00
Ed Page
b0027b5943
docs: Further clarify the text 2022-09-20 16:21:10 -05:00
Tshepang Mbambo
a6822a27b4
a comma felt wrong there 2022-09-20 23:09:19 +02:00
Ed Page
2d83a7b12e feat(error): Break out error-context feature flag
This is a cheap pass at creating this to allow cutting out the cost of
rich error information / programmatic error information.

This cuts about 20 KiB off of the binary.

There is more we could cut out, like collecting of used arguments for
the usage, but I want to keep the conditionals simple.
2022-09-19 10:23:55 -05:00
Ed Page
94c5802aae docs: Update changelog 2022-09-19 09:28:56 -05:00
Ed Page
acb0fb7809 fix: Generalize mut_arg, like mut_subcommand
This makes us accept `str` and not do any allocations at the cost of
panicing if unsupported which I think fits our overall story in trying
to catch development-time errors.
2022-09-16 15:31:49 -05:00
Ed Page
14c6ce0e83 fix(derive): Remove next_help_heading isolation
Originally, I saw the ideal as the parent command being isolated from
`#[clap(flatte)]` especially after all of the doc comment
leakage issues.  We scaled that back to just `next_help_heading` because
of the issues with settling on a policy and maintenance to cover
everything.  When doing `next_display_order`, we decided it would mess
things up too much to isolate it.

With #1807, we instead have been moving towards setting
`#[command(next_help_heading)]` anywhere, we just need to finish working
out how it should work.
2022-09-16 15:31:49 -05:00
Ed Page
b7d13dfb88 fix(parser): Prefer invalid subcommands over invalid args
Just having `--help` or `--version` can make us get invalid args instead
of invalid subcommands.   It doesn't make sense to do this unless
positionals are used.  Even then it might not make sense but this is at
least a step in the right direction.

Unsure how I feel about this being backported to clap 3.  It most likely
would be fine?

This was noticed while looking into #4218
2022-09-15 10:30:03 -05:00
Ed Page
23ce67e323 feat: Allow resetting builder methods
Fixes #4178
2022-09-13 15:16:57 -05:00
Ed Page
f68500d9fd fix: Replace Arg::env with Arg::env_os
With `Into<OsStr>`, the separate function isn't needed.
2022-09-13 14:55:12 -05:00
Ed Page
d3bf5450ff feat(derive): Reserve the T group name
Since the `name` is changed to be the package name, we can't use it as
(1) its not as predictable and (2) it can lead to conflicts if a
`Parser` is flattened into a `Parser`
2022-09-13 07:44:36 -05:00
Ed Page
0eb95022a5 fix(help): Respect LINES and COLUMNS
Fixes #4186
2022-09-12 20:17:20 -05:00
Ed Page
c9eef44213 fix: Make arg!(--flag <value>) optional by default
This was ported over from the usage parser which modeled after docopt.
We just never got around to implementing the rest of the syntax.

However, when considering this as a standalone feature, an
`arg!(--flag <value>)`, outside of other context, should be optional.
This is how the help would display it.

Fixes #4206
2022-09-12 17:10:01 -05:00
Ed Page
75a73f3fe0 docs: Feature moved to v3 2022-09-12 16:25:18 -05:00
Ed Page
a86e55ad3e docs: Add more highlights 2022-09-09 19:06:33 -05:00
Ed Page
fadcaf9860 docs: Help people through Action changes 2022-09-08 16:02:12 -05:00
Ed Page
6f185a8704 docs: Clarify intent of upgrade link 2022-09-08 15:56:56 -05:00
Ed Page
17f49df4e2 revert(derive): Bald action/value_parser are deprecated, its good enough
When I removed these in v5, we didn't have a deprecation approach for
the derive and I didn't want to forget.  Now we do have a deprecation
approach and that is the reminder, so we don't need to carry around v5
changes.
2022-09-07 19:34:50 -05:00
Ed Page
b502ac750b docs: Summarize reason for change 2022-09-07 19:30:57 -05:00
Ed Page
c90a4eabae fix(help): Make output more dense
In looking at other help output, I noticed that they use two spaces, in
place of clap's 4, and it doesn't suffer from legibility.  If it
doesn't make the output worse, let's go ahead and make it as dense so we
fit more content on the screen.

This is a part of #4132
2022-09-07 17:13:55 -05:00
Ed Page
bbb6c38bad fix(help):Be dense on short next line help
If short help is too long for the terminal, clap will automatically
switch to next line help.  As part of next line help for longs, we add a
blank line between args.  This helps make the args clearer when dealing
with multiple paragraphs.  However, its not as much needed for short and
subcommands (always short), so now short matches subcommands.

This was inspired by #3300 and a part of #4132
2022-09-07 14:05:17 -05:00