Commit graph

6744 commits

Author SHA1 Message Date
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
df1efb4c53
Merge pull request #4486 from jpgrayson/master
fix: ContextKind.as_str() spellings
2022-11-16 10:26:28 -06:00
Peter Grayson
d9c9c7bdd8
fix: ContextKind.as_str() spellings
Signed-off-by: Peter Grayson <pete@jpgrayson.net>
2022-11-16 11:14:54 -05: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
8cefdf31cc
Merge pull request #4482 from epage/suggest
feat(parser): Show available subcommands when one is missing
2022-11-15 10:40:16 -06:00
Ed Page
6b62c82fe2 feat(parser): Show available subcommands when one is missing
Similar to
- Listing all required arguments when one is missing
- Listing all possible values when no value is provided

This came up when discussing #3572
2022-11-15 10:18:24 -06:00
Ed Page
d21ee513fd test(parser): Verify subcommand required message 2022-11-15 10:12:05 -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
8171a5f6d0
Merge pull request #4480 from epage/panic
fix: Don't panic on non-built arg rendering
2022-11-14 12:30:39 -06:00
Ed Page
c939de8a25 fix: Don't panic on non-built arg rendering
For num_args, we'll just use the default

Fixes #4479
2022-11-14 12:13:18 -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
e6a3529e24
Merge pull request #4474 from epage/utf8
fix(parser): Don't panic on invalid UTF-8 values
2022-11-11 12:46:02 -06:00
Ed Page
e9cbed34cd fix(parser): Don't panic on invalid UTF-8 values
Fixes #4473
2022-11-11 12:26:04 -06:00
Ed Page
45d26e0013 test(parser): Show UTF8 bug 2022-11-11 12:22:30 -06:00
Ed Page
4d69e56f06
Merge pull request #4471 from epage/assert
test(assert): Verify empty positional assert exists
2022-11-09 22:22:52 -06:00
Ed Page
ec03972023 test(assert): Verify empty positional assert exists
Wondered if we had this for #4467.  Figured we should actually test it.
2022-11-09 22:10:37 -06:00
Ed Page
0d27188d87
Merge pull request #4465 from epage/help
fix(help): Clarify that 'help' command accepts multiple
2022-11-07 23:21:46 -06:00
Ed Page
9376a57d40 fix(help): Clarify that 'help' command accepts multiple
Making this plural can go either way as
- Clarify it is plural
- This is all really to simulate actually doing subcommands and you only
  do one at a time

For now, I lean towards clarifying it is plural

I also tweaked the message to be more consistent with how `--help` and
`-h` describe themselves.

Fixes #4342
2022-11-07 23:04:04 -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
eaa6bfe826
Merge pull request #4463 from epage/help
fix(help): Update auto-next-line to use new padding
2022-11-07 10:46:43 -06:00
Ed Page
dfe9e73880 fix(help): Update auto-next-line to use new padding
In clap v4, we changed the padding from 4 to 2 but we didn't update our
calculation for when to switch to next-line-help as it was a magic
number (we tried to catch all of these).

When updating the tests, we also missed that a test was being wrapped
too narrowly

This was found while discussing #3300
2022-11-07 10:36:51 -06:00
Ed Page
539577dfb2 refactor(help): Remove dead code
`longest` is always the same or longer than the `sc_str.display_width`
2022-11-07 10:27:17 -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
87edc19ef7
Merge pull request #4461 from epage/help
fix(derive): Allow 'long_help' to force populating from doc comment
2022-11-07 09:59:06 -06:00
Ed Page
c37ab6c205 fix(derive): Allow 'long_help' to force populating from doc comment
Fixes #4441
2022-11-07 09:41:52 -06:00
Ed Page
8751152316 test(derive): Verify long_help behavior 2022-11-07 09:36:53 -06:00
Ed Page
c1a9da9124 refactor(derive): Decouple extracting and formatting of doc comments 2022-11-07 09:17:04 -06:00
Ed Page
214f6b8966 refactor(derive): Clarify bool arg 2022-11-07 08:31:37 -06:00
Ed Page
bcbf0b4e04
Merge pull request #4460 from epage/help
refactor(derive): Clean up doc comment handling
2022-11-07 08:22:49 -06:00
Ed Page
73be1fef99 refactor(derive): Remove dead code 2022-11-07 08:08:06 -06:00
Ed Page
5ee9e0fe76 refactor(derive): Decouple doc comment parsing from methods 2022-11-07 08:06:10 -06:00
Ed Page
6ace0410c1 refactor(derive): Clarify leading-space removal 2022-11-07 07:49:44 -06:00
Ed Page
d1db3d2f0e refactor(derive): Clarify empty doc needs 2022-11-07 07:48:16 -06:00
Ed Page
c75b81eeb8 chore: Release 2022-11-07 07:39:49 -06:00
Ed Page
28324d8df7 docs: Update changelog 2022-11-07 07:39:36 -06:00
Ed Page
571f45080e
Merge pull request #4447 from tmccombs/guess-shell
Add support for determining current shell from environment
2022-11-07 07:38:51 -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
816841f934
Merge pull request #4459 from epage/unit
fix(derive): Allow defaulted value parser for '()' fields
2022-11-07 06:22:18 -06:00
Ed Page
79225d3a2d fix(derive): Allow defaulted value parser for '()' fields
Inspired by #4458

This is a compatible change because it turns a compiler error into a
working case.
2022-11-07 06:07:51 -06:00
Thayne McCombs
86db119153 feat(complete): Support getting shell from env
Add functions for getting the Shell from a path and for getting the
current shell form environment variables.

Closes: #4446
2022-11-06 23:39:55 -07:00
Ed Page
520145ee67
Merge pull request #4449 from epage/update
chore: Update trycmd
2022-11-04 10:44:36 -05:00
Ed Page
a24fb589eb chore: Update trycmd 2022-11-04 10:27:57 -05:00