Ed Page
261116d4b4
fix(complete)!: Rename CustomCompleter::completions to candidates
...
After thinking on this, I feel like it gives a better sense that the
user doesn't get a say in the completion but they give us the options
and we take care of it.
2024-08-09 13:56:47 -05:00
Ed Page
7d14ce34de
fix(builder)!: Move remove to reflection from builder
...
It isn't derive compatible, so I have the feeling it should be treated
differently.
2024-08-09 13:54:39 -05:00
Ed Page
fba563a717
Merge pull request #5641 from epage/dynamic
...
refactor(complete): Split up completion code
2024-08-09 13:27:28 -05:00
Ed Page
a4775efca1
refactor(complete): Split up completion code
2024-08-09 13:20:37 -05:00
Ed Page
5a839d6f37
Merge pull request #5640 from epage/prefix
...
refactor(complete): Minor clean up
2024-08-09 13:08:27 -05:00
Ed Page
18c560e52f
style(complete): Make clippy happy
2024-08-09 13:00:22 -05:00
shanmu
2b3fc25361
refactor(complete): Add add_prefix
to CompletionCandidate
2024-08-09 12:58:45 -05:00
Ed Page
d222ae4cb6
chore: Release
2024-08-08 11:09:07 -05:00
Ed Page
a8abcb40c5
docs: Update changelog
2024-08-08 11:08:55 -05:00
Ed Page
2690e1bdb1
Merge pull request #5621 from shannmu/dynamic_valuehint
...
Support dynamic value of argument completion
2024-08-08 10:55:03 -05:00
shanmu
7fd7b3e40b
feat(clap_complete): Support to complete custom value of argument
2024-08-08 23:47:17 +08:00
Ed Page
fc6aaca52b
Merge pull request #5638 from epage/cargo
...
docs(cookbook): Style cargo plugin
2024-08-08 10:41:19 -05:00
Ed Page
631e54bc71
docs(cookbook): Style cargo plugin
...
Inspired by part of the conversation at #3234
2024-08-08 10:31:27 -05:00
Ed Page
6fb49d08bb
Merge pull request #5636 from gibfahn/styles_const
...
refactor(styles): make styles example use a const
2024-08-08 09:17:52 -05:00
Gibson Fahnestock
6f215eee98
refactor(styles): make styles example use a const
...
This makes it easier to copy this example for use in the derive API,
like so:
```rust
const STYLES: Styles = Styles::styled()
.header(AnsiColor::Green.on_default().bold())
.usage(AnsiColor::Green.on_default().bold())
.literal(AnsiColor::Blue.on_default().bold())
.placeholder(AnsiColor::Cyan.on_default());
#[derive(Parser)]
#[clap(styles = STYLES)]
struct Cmd {
...
}
```
If you use the `|` method then it's not a constant function.
2024-08-08 15:04:32 +01:00
shanmu
bbb2e6fdde
test: Add test case for completing custom value of argument
2024-08-08 20:56:51 +08:00
shanmu
999071c46d
fix: Change visible
to hidden
2024-08-08 20:56:31 +08:00
Ed Page
ecb4dca96f
Merge pull request #5635 from epage/delim
...
docs(builder): Remove bad copy/paste docs
2024-08-07 15:33:05 -05:00
Ed Page
0c4c586083
docs(builder): Remove bad copy/paste docs
...
Fixes #5626
2024-08-07 15:26:05 -05:00
Ed Page
9be1319287
Merge pull request #5634 from epage/ext
...
fix: Ensure unstable-ext gets enabled
2024-08-07 14:04:06 -05:00
Ed Page
fb24f9b99c
fix: Ensure unstable-ext gets enabled
2024-08-07 13:56:43 -05:00
Ed Page
d15c9affeb
Merge pull request #5633 from epage/ext
...
fix(ext)!: Make extension methods fluent
2024-08-07 10:58:13 -05:00
Ed Page
11538586eb
fix(ext)!: Make extension methods fluent
2024-08-07 10:40:07 -05:00
Ed Page
c6d7a32935
test: Include unstable-ext
2024-08-07 10:30:00 -05:00
Ed Page
862a0ffe9b
docs: Include unstable-ext
2024-08-07 10:29:42 -05:00
Ed Page
edcaf8fcae
Merge pull request #5619 from epage/reexport
...
feat(complete): Reexport ValueHint for transition to ArgExt
2024-08-02 10:31:56 -05:00
Ed Page
4db9fce3d7
feat(complete): Reexport ValueHint for transition to ArgExt
2024-08-02 10:24:43 -05:00
Ed Page
e5195fdf77
Merge pull request #5618 from epage/ext
...
feat(builder): Add Extension API
2024-08-02 10:13:04 -05:00
Ed Page
ddd3b0c6b7
refactor(builder): Move ValueHint to an ArgExt
2024-08-02 09:59:46 -05:00
Ed Page
19f935aa61
feat(builder): Add Extension API
2024-08-02 09:46:44 -05:00
Ed Page
280d921dee
refactor(buider): Simplify Extension's design
2024-08-02 08:49:48 -05:00
Ed Page
4edfd7220a
docs: Mark unstable-styles feature as deprecated
2024-08-02 08:22:31 -05:00
Ed Page
5f99b060a6
Merge pull request #5617 from epage/color
...
docs: Cross-link color control to Command::styles
2024-08-02 08:21:13 -05:00
Ed Page
99f1fa6b51
docs: Cross-link color control to Command::styles
...
Inspired by #5590
2024-08-01 09:52:50 -05:00
renovate[bot]
f3c4216336
chore(deps): Update compatible (dev) ( #5616 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-01 00:16:23 +00:00
Ed Page
66b5a122ec
chore: Release
2024-07-31 16:26:41 -05:00
Ed Page
a83b724fc1
docs: Update changelog
2024-07-31 16:26:27 -05:00
Ed Page
e19469f0e2
Merge pull request #5615 from epage/wrap
...
fix(help): Properly wrap subcommand about
2024-07-31 16:24:10 -05:00
Ed Page
360bb3bc11
fix(help): Properly wrap subcommand about
...
Fixes #5607
2024-07-31 16:17:40 -05:00
Ed Page
58b5bd89ea
test(help): Show bad subcommand wrapping
2024-07-31 16:17:40 -05:00
Ed Page
e1f6320730
Merge pull request #5614 from epage/snap
...
test(help): Switch to snapbox
2024-07-31 16:07:55 -05:00
Ed Page
7b5b61b021
test(help): Switch to snapbox
2024-07-31 15:58:24 -05:00
Ed Page
1490e2434a
chore: Update snapbox
2024-07-31 15:38:49 -05:00
Ed Page
6671d93500
Merge pull request #5613 from epage/flatten
...
fix(derive): Improve flattening-skipped-group assert
2024-07-31 15:30:28 -05:00
Ed Page
13dfdb3870
fix(derive): Improve flattening-skipped-group assert
...
- Improves the error message
- Happens on initialization, rather than parse, making it so it will
always show up and not just when certain parts of the CLI are
exercised
Fixes #5609
2024-07-31 15:19:29 -05:00
Ed Page
e1bdfcc6ad
Merge pull request #5612 from epage/ui
...
test(derive): Update UI tests to stable
2024-07-31 15:19:00 -05:00
Ed Page
4f875ffe20
test(derive): Show existing flatten behavior
2024-07-31 15:10:32 -05:00
Ed Page
c4e0d67bba
test(derive): Update UI tests to stable
2024-07-31 14:52:53 -05:00
Ed Page
d18615dfc0
chore: Release
2024-07-31 12:20:00 -05:00
Ed Page
7d0c7bceaf
docs: Update changelog
2024-07-31 12:19:41 -05:00