Ed Page
d7b8aafdc3
refactor(complete): Dont duplicate complete_path
2024-08-21 13:32:47 -05:00
Ed Page
218ee5d9dc
refactor(complete): Move complete_path to long term location
...
I'd like to remove `ValueHint` eventually
2024-08-21 13:19:39 -05:00
Ed Page
78157e6ce6
fix(complete): Preserve absolute paths
2024-08-21 11:58:11 -05:00
Ed Page
ebb1302e90
refactor(complete): Remove no-op help calls
2024-08-21 11:29:08 -05:00
Ed Page
2f07f3cc61
refactor(complete): Remove manual path splitting
2024-08-21 11:27:55 -05:00
a-kenji
4fbbc3a6ca
fix: Typos in documentation to CompleteEnv
2024-08-20 22:12:16 +02:00
Ed Page
5034cabe54
chore: Release
2024-08-20 08:59:56 -05:00
Ed Page
b5b690c459
docs: Update changelog
2024-08-20 08:59:48 -05:00
Ed Page
6ddd5d4e11
fix(complete)!: Rename ArgValueCompleter to ArgValueCandidates
2024-08-20 08:49:22 -05:00
Ed Page
71c5e27f8b
fix(complete)!: Rename CustomCompleter to ValueCandidates
2024-08-20 08:48:19 -05:00
Ed Page
108907385c
chore: Release
2024-08-19 10:47:04 -05:00
Ed Page
c9b8c85f09
docs: Update changelog
2024-08-19 10:46:56 -05:00
Ed Page
b38538d7c4
fix(complete)!: Rename dynamic to engine
...
This serves as a more specific name.
2024-08-19 10:37:51 -05:00
Ed Page
0209a79031
fix(complete): Don't cause endless completions for bash/zsh
...
Reported on #5677
2024-08-19 10:26:16 -05:00
Ed Page
d81158599f
chore: Release
2024-08-16 16:16:50 -05:00
Ed Page
ab948b3556
docs: Update changelog
2024-08-16 16:16:41 -05:00
shanmu
59bf26dd56
feat(clap_complete): Support delimiter values in native completions
2024-08-16 15:54:01 -05:00
shannmu
ccecab394b
test(clap_complete): Add test cases for delimiter_values support
2024-08-16 15:54:01 -05:00
Ed Page
6013ad4f67
chore: Release
2024-08-16 11:01:46 -05:00
Ed Page
f98e3ee215
docs: Update changelog
2024-08-16 11:01:38 -05:00
Ed Page
3c69aaa312
docs(complete): Add stdout warning to env
2024-08-16 10:42:00 -05:00
Ed Page
e46263a048
docs(complete): Redistribute dynamic's documentation
2024-08-16 10:40:46 -05:00
Ed Page
de723aaf8a
fix(complete)!: Flatten in prep for stabilization
2024-08-16 10:35:07 -05:00
Ed Page
6727c1537b
fix(complete): Section off existing completions
2024-08-16 10:26:50 -05:00
Ed Page
6842ed96da
refactor(complete): Remove low-value w macro
2024-08-16 10:10:26 -05:00
Ed Page
b2c3126a4d
docs(complete): Specify the compatibility guarentees
2024-08-16 09:34:58 -05:00
Ed Page
f969bec2c0
feat(complete): Add Shells::iter
...
Didn't add an `IntoIterator` because I didn't want to bother writing an
opaque iterator type
2024-08-16 09:39:58 -05:00
Ed Page
661ccc2d30
feat(complete): Make Shells::builtins const
2024-08-16 09:39:58 -05:00
Ed Page
82b481e8e7
refactor(complete): Simplify state tracking
2024-08-15 15:07:11 -05:00
Ed Page
7b12c58111
refactor(complete): Simplify num_args lookup
2024-08-15 15:06:19 -05:00
Ed Page
077d714162
refactor(complete): Leverage ArgAction::takes_values
2024-08-15 14:51:47 -05:00
Ed Page
afc7bebc66
refactor(complete): Track shorts in a String, not OsString
2024-08-15 14:46:50 -05:00
Ed Page
caf8ee5acc
refactor(complete): Pull out common code
2024-08-15 14:29:42 -05:00
Ed Page
2cf4139b8b
fix(complete): Give ArgValueCompleter higher precedence over possible values
...
It is the more specific action, being specialized to completions and not
generally used for all of clap.
2024-08-15 14:27:05 -05:00
Ed Page
cedb1f01d1
chore: Release
2024-08-12 13:09:45 -05:00
Ed Page
c22a5100c2
docs(complete): Fix registration commands
2024-08-12 13:09:35 -05:00
Ed Page
050b6c5ca5
chore: Release
2024-08-12 12:02:15 -05:00
Ed Page
5e61bd4290
docs: Update changelog
2024-08-12 12:02:02 -05:00
Ed Page
6f880911bf
Merge pull request #5671 from epage/env
...
feat(complete): Env hook for dynamic completions
2024-08-12 11:54:33 -05:00
Ed Page
c402ec61ee
feat(complete): Env hook for dynamic completions
...
Fixes #3930
2024-08-12 10:53:24 -05:00
Ed Page
6288e1169d
test(complete): Specialize tests
2024-08-12 10:40:41 -05:00
Ed Page
84cfd92843
Merge pull request #5667 from a-kenji/fix-typo
...
Fix typo in dynamic completion doc comment
2024-08-12 08:38:57 -05:00
Ed Page
cddbb5689f
fix(complete): Correct version check
2024-08-12 08:29:11 -05:00
Ed Page
63740539d3
style: Order fn attributes
2024-08-12 08:26:42 -05:00
Ed Page
f75251f5ae
fix(complete)!: Rename shells to command
2024-08-12 08:12:21 -05:00
a-kenji
ef8dc8fe11
fix: Typo in dynamic completion doc comment
2024-08-12 14:12:17 +02:00
Ed Page
158e7161aa
fix(complete)!: Remove unused CommandCompleter trait method
2024-08-10 21:27:02 -05:00
Ed Page
b94fce3242
fix(complete)!: Put CompleteCommand behind unstable-command
...
Avoid the cost of the deps when not needed.
2024-08-10 20:41:01 -05:00
Ed Page
2b2b2be610
refactor(complete): Isolate all CommandCompleter knowledge
2024-08-10 20:34:20 -05:00
Ed Page
d064946c60
refactor(complete): Consolidate CommandCompleter's
2024-08-10 20:28:22 -05:00
Ed Page
d69e0dc777
fix(complete)!: Rename ShwllCompleter to CommandCompleter
...
This opens space for several completion strategies
2024-08-10 20:24:53 -05:00
Ed Page
775688e7d1
fix(complete)!: Dont assume powershell on Windows
...
We have issues open for other Windows shells, so this seems like a bad
idea.
2024-08-10 20:07:41 -05:00
Ed Page
0d7cb9eeec
fix(complete)!: Error, rather than default, on unknown shell
2024-08-10 19:54:49 -05:00
Ed Page
64bf287e68
fix(complete)!: Switch --shell
to a positional
...
This matches how I've seen it done elsewhere
and removes extra boilerplate
2024-08-10 19:38:59 -05:00
Ed Page
c9df58bcf7
fix(complete)!: Remove --register
...
Our focus is on encouraging people to generate this on shell load so its
more "auto-updating" as programs are updated.
Having a flag for saving to a file is counter to that goal.
2024-08-10 19:33:49 -05:00
Ed Page
34c86159a9
fix(complete): Ensure bash does not sort, we do
2024-08-10 18:31:30 -05:00
Ed Page
10607966bd
refactor(complete): Organize around completion UI
2024-08-10 15:49:52 -05:00
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
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
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
e65e46356d
docs(complete): Have dynamic Shell match static Shell
2024-08-09 15:59:59 -05:00
Ed Page
7fa26589df
feat(complete): Infer shell for dynamic completions
2024-08-09 15:44:32 -05:00
shannmu
f9a87bf1bf
feat(clap_complete): Add support for Powershell
2024-08-09 15:48:20 -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
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
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
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
a4775efca1
refactor(complete): Split up completion code
2024-08-09 13:20:37 -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
shanmu
7fd7b3e40b
feat(clap_complete): Support to complete custom value of argument
2024-08-08 23:47:17 +08: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
4db9fce3d7
feat(complete): Reexport ValueHint for transition to ArgExt
2024-08-02 10:24:43 -05:00
Mixu78
10fd5fe8e3
fix(clap_complete): Add missing option hyphens to the listItemText parameter in PowerShell completions
2024-07-31 21:30:55 +03: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
shannmu
f0bd47506f
feat(clap_complete): Support multi-values of positional argument with num_arg(N)
2024-07-31 20:27:37 +08:00
shanmu
3f2466b2f6
test(clap_complete): Add test case for multi-values of positional argument with num_args(N)
2024-07-31 20:25:57 +08:00
shannmu
75a45e5aa0
feat(clap_complete): Support multiple values after flags in native completions
2024-07-30 18:33:43 +08:00
shannmu
5d8c84b83e
test(clap_complete): Add test case for multi-values comlpetion after flags
2024-07-30 18:32:29 +08:00
Ed Page
9c6ef3e057
refactor: Resolve deprecations
2024-07-26 14:24:08 -05:00
Ed Page
82912c3a51
style: Make clippy happy
2024-07-26 14:24:08 -05:00
Ed Page
349ed304cf
chore: Release
2024-07-25 13:08:28 -05:00
Ed Page
68ed9ff02d
docs: Update changelog
2024-07-25 13:08:20 -05:00
Ed Page
afecaa4f9a
Merge pull request #5576 from shannmu/option_value_new
...
feat(clap_complete): Support `-fbar` and `-f=bar` in native completions
2024-07-25 13:07:24 -05:00
Ed Page
4a00677024
chore: Release
2024-07-25 08:39:13 -05:00