Commit graph

8028 commits

Author SHA1 Message Date
Ed Page
8cb0e7fdaf test(complete): Normalize snapshot format 2024-08-10 18:37:01 -05:00
Ed Page
e3188215ca chore: Release 2024-08-09 19:30:46 -05:00
Ed Page
79bbdb78c8 docs: Update changelog 2024-08-09 19:30:37 -05:00
Ed Page
c8cff2f123 fix(complete): Ensure new-enough clap is used 2024-08-09 19:26:19 -05:00
Ed Page
4094435c88 chore: Release 2024-08-09 19:24:38 -05:00
Ed Page
36114c35a5 docs: Update changelog 2024-08-09 19:24:19 -05:00
Ed Page
918cfed43d
Merge pull request #5610 from Mixu78/powershell_hyphens
Add missing option hyphens to generated PowerShell completion scripts
2024-08-09 19:22:30 -05:00
Ed Page
c55f642ac8
Merge pull request #5648 from epage/cli
feat(complete): Make registration args optional
2024-08-09 16:24:28 -05:00
Ed Page
219a1915e9 fix(complete): Improve help output 2024-08-09 16:17:44 -05:00
Ed Page
734cac730c feat(complete): Make '--register' optional 2024-08-09 16:16:15 -05:00
Ed Page
fa4ccec694 feat(complete): Make '--shell' optional 2024-08-09 16:10:37 -05:00
Ed Page
efdcad16e9
Merge pull request #5647 from epage/infer
feat(complete): Infer shell for dynamic completions
2024-08-09 16:06:31 -05:00
Ed Page
e65e46356d docs(complete): Have dynamic Shell match static Shell 2024-08-09 15:59:59 -05:00
Ed Page
8a1f9b3c47
Merge pull request #5646 from epage/powershell
feat(clap_complete): Add support for Powershell
2024-08-09 15:55:58 -05:00
shannmu
f9a87bf1bf feat(clap_complete): Add support for Powershell 2024-08-09 15:48:20 -05:00
Ed Page
7fa26589df feat(complete): Infer shell for dynamic completions 2024-08-09 15:44:32 -05:00
Ed Page
7916e79a58
Merge pull request #5645 from epage/complete
docs(complete): Clarify CompletionCandidate
2024-08-09 15:36:39 -05:00
Ed Page
60597130cc
Merge pull request #5644 from epage/complete
doc(complete): More polish
2024-08-09 15:23:55 -05:00
Ed Page
ad48d3b2a9 docs(complete): Clarify CompletionCandidate 2024-08-09 15:21:06 -05:00
Ed Page
fb243a8801 doc(complete): Show easier access to CompleteCommand 2024-08-09 15:14:33 -05:00
Ed Page
6d45f41415 docs(complete): Clarify dynamic's support for ValueHint 2024-08-09 15:14:33 -05:00
Ed Page
5f322e481a docs(complete): Tell users how to customize 2024-08-09 15:11:55 -05:00
Ed Page
b4625620fd fix(complete): Make it easier to access clap integration 2024-08-09 15:09:40 -05:00
Ed Page
3afcad9d74
Merge pull request #5643 from epage/complete
docs(complete): Expand dynamic docs
2024-08-09 15:05:45 -05:00
Ed Page
c2765a4e85 docs(complete): Expand dynamic docs 2024-08-09 14:56:58 -05:00
Ed Page
f374830df4 feat(complete): Add CompleteArgs::complete 2024-08-09 14:31:57 -05:00
Ed Page
f807acef6d refactor(complete): Move impl next to type 2024-08-09 14:30:47 -05:00
Ed Page
b1e5bc7be5
Merge pull request #5642 from epage/api
fix(complete)!: Audit the API
2024-08-09 14:16:56 -05:00
Ed Page
38816ddb33 fix(complete)!: Clarify Completer is a ShellCompleter 2024-08-09 14:03:02 -05:00
Ed Page
16366d21f1 fix(complete)!: Move Completer into shells
It only exists for shell-adaptation, so it feels like it better belongs
there.
2024-08-09 14:00:42 -05:00
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