Ed Page
77803337f8
Merge pull request #4612 from davvid/zsh-multi-length-arguments
...
clap_complete: fix support for two multi-length arguments in zsh
2023-02-23 11:55:17 -06:00
Ed Page
f35ff9167f
chore: Release
2023-02-23 11:19:10 -06:00
Ed Page
44782c7f71
docs(lex): Don't elide content
2023-02-23 11:18:51 -06:00
Ed Page
ec878c849b
chore: Release
2023-02-22 16:15:24 -06:00
Ed Page
f3be52ed7d
docs: Update changelog
2023-02-22 16:15:12 -06:00
Ed Page
776f12ebb6
Merge pull request #4645 from bgilbert/mangen-flag
...
fix(mangen): Avoid spurious value names for derive args without values
2023-02-22 16:14:21 -06:00
Ed Page
2a91e4f3e1
Merge pull request #4717 from epage/clap-ectomy
...
docs: Remove remaining references to clap attribute
2023-02-18 18:52:47 -06:00
Ed Page
953e2dcd34
docs: Remove remaining references to clap attribute
2023-02-18 18:42:07 -06:00
Ed Page
5e240dddee
chore: Release
2023-02-15 11:34:25 -06:00
Ed Page
4648b6b49d
docs: Update changelog
2023-02-15 11:34:11 -06:00
Martin Fischer
8c92ef6c76
fix(help): Fix yet another --help long help edge case ( #4712 )
2023-02-15 11:33:35 -06:00
Ed Page
fb9435d026
chore: Release
2023-02-15 10:27:15 -06:00
Ed Page
9270d2382e
docs: Update changelog
2023-02-15 10:26:23 -06:00
Martin Fischer
473cf175a2
fix(help): Fix --help help text in edge case ( #4710 )
...
We were accidentally showing long help just because a hidden argument had a description for a possible value. This is most likely to be hit with the derive API as the value descriptions are automatically applied from documentation.
2023-02-15 10:25:19 -06:00
Ed Page
62da8f94b9
Merge pull request #4711 from aleksanderkrauze/improve-builder-str-inner-into-string-implementation
...
Improve builder::str::inner::Inner::into_string implementation
2023-02-15 10:09:47 -06:00
Aleksander Krauze
d6e7d4699f
Improve builder::str::inner::Inner::into_string implementation
...
Since `Inner::into_string` already takes ownership of `self` we can
avoid unnecessary copy and allocation by moving `Box<str>` and using
its implementation of `Into<String>`.
2023-02-15 16:16:14 +01:00
Ed Page
ad5d67623a
Merge pull request #4696 from graves501/patch-1
...
Fix typo in example git.rs
2023-02-07 16:52:03 -06:00
graves501
ad6778d206
Fix typo in git.rs
2023-02-07 23:13:52 +01:00
Ed Page
100f01be1b
Merge pull request #4694 from epage/sub
...
docs(examples): Differentiate struct from command name
2023-02-06 10:41:10 -06:00
Ed Page
3f2625fc5e
docs(examples): Differentiate struct from command name
...
This supersedes #4692
2023-02-06 10:25:14 -06:00
Ed Page
956dc6a6da
Merge pull request #4684 from martinfrances107/clippy
...
#4683 Clippy: make format!() calls more readable.
2023-01-30 07:50:26 -06:00
Martin
704d0e7a4f
chore: Make format!() calls more readable
2023-01-29 19:14:47 +00:00
Ed Page
6e5e31a02c
docs(tutorial): Clarify use of Append in derive
2023-01-27 15:24:35 -06:00
Ed Page
2c64f920e2
docs(man): Remove version from setup steps
2023-01-27 11:38:33 -06:00
Ed Page
a59a53503e
chore: Release
2023-01-24 16:41:52 -06:00
Ed Page
4348f43b21
docs: Update changelog
2023-01-24 16:41:45 -06:00
Ed Page
7c4c6586d0
Merge pull request #4673 from epage/arg
...
perf: Speed up compiling `arg!` macro
2023-01-24 16:40:50 -06:00
Ed Page
bbe5eaa709
perf: Speed up compiling arg!
macro
...
To "append" calls, we were passing in a more and more complex expression
on each recursive invocation. We now pass in a fixed amount of data on
each iteration, reducing how much the macro machinery needs to parse,
speeding up builds.
Fresh builds went from 39s to 32s on my machine.
Inspired by #4670
2023-01-24 16:23:44 -06:00
Ed Page
b3c4b4016c
Merge pull request #4672 from epage/help
...
fix(help): Respect `disable_colored_help` for `arg_required_else_help`
2023-01-24 16:22:12 -06:00
Ed Page
dc89379ff6
fix(help): Respect disable_colored_help
for arg_required_else_help
...
Fixes #4671
2023-01-24 15:53:00 -06:00
Ed Page
10a87c662d
chore: Release
2023-01-23 16:00:15 -06:00
Ed Page
8ee9242a0e
docs: Update changelog
2023-01-23 16:00:10 -06:00
Ed Page
125dbe0cfd
Merge pull request #4667 from corneliusroemer/fix-4666
...
fix: Add plural s to context in suggestions
2023-01-23 15:58:37 -06:00
Ed Page
401d86fb9c
Merge pull request #4668 from corneliusroemer/fix-4660
...
fix(suggestions): Replace wrong Jaro-Winkler
2023-01-23 15:55:59 -06:00
Cornelius Roemer
f5540d2646
fix(suggestions): Replace wrong Jaro-Winkler
...
Implementation of Jaro-Winkler similarity in the dguo/strsim-rs crate
is wrong, causing strings with common prefix >=10
to all be considered perfect matches
Using Jaro instead from the same crate fixes this issue
Benefit of favoring long prefixes exists for matching common names
But not for typo detection
Hence use of Jaro instead of Jaro-Winkler is acceptable
Confidence threshold adjusted so that `bar` is still suggested for `baz`
since Jaro is strictly < Jaro-Winkler
such an adjustment is expected. This is acceptable.
While exact suggestions may change, the net change will be positive
Suggestions are purely decorative and should thus not breaking change
Fixes #4660
Also see https://github.com/dguo/strsim-rs/issues/53
2023-01-23 22:43:48 +01:00
Cornelius Roemer
5dcc5c9509
fix: Add plural s in suggestions
...
Old: `note: subcommand 'test', 'temp' exist`
New: `note: subcommands 'test', 'temp' exist`
Fixes #4666
2023-01-23 22:16:50 +01:00
Ed Page
90c042eeae
chore: Release
2023-01-23 13:05:20 -06:00
Ed Page
4f638b5c75
docs: Update changelog
2023-01-23 13:05:15 -06:00
Ed Page
930a40c1df
Merge pull request #4663 from fredrik-jansson-se/master
...
fix: Make cmd variable (bash completion) local
2023-01-23 13:04:09 -06:00
Fredrik Jansson
3426310d8e
fix: Bash test cases
2023-01-23 19:20:09 +01:00
Fredrik Jansson
8b455d28e7
fix: Make cmd a local var in bash completion
2023-01-23 19:07:15 +01:00
Ed Page
3591dc7e84
test: Remove extraneous to_owned's
2023-01-23 10:33:47 -06:00
Ed Page
098a7007bb
Merge pull request #4664 from epage/suggest
...
test: Verify suggestions
2023-01-23 10:17:12 -06:00
Ed Page
cf970e6d0e
test: Very best-fit for suggestions
...
Inspired by #4660
2023-01-23 09:58:03 -06:00
Ed Page
39fc252196
test: Re-enable suggestion tests
2023-01-23 09:55:14 -06:00
Ed Page
9f4f341604
chore: Release
2023-01-23 09:37:47 -06:00
Ed Page
faee38f59d
docs: Update changelog
2023-01-23 09:37:06 -06:00
Ed Page
a493bb54f4
Merge pull request #4659 from epage/flag
...
docs: Prefer `get_flag` over `get_one::<bool>`
2023-01-23 09:36:21 -06:00
Ed Page
9d1de20787
docs: Prefer get_flag
over get_one::<bool>
...
Inspired by #4654
2023-01-23 09:23:38 -06:00
Benjamin Gilbert
3755c56dcf
fix(mangen): Avoid spurious value for derive arg
...
derive arguments like this:
#[arg(long)]
pub flag: bool,
were producing option descriptions like this:
--flag=FLAG
FLAG is spurious. It turns out that derive always sets a value name, for
simplicity, even when there are no arguments. Check for this case.
Fixes #4443 .
2023-01-16 12:04:43 -05:00