Commit graph

470 commits

Author SHA1 Message Date
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