Commit graph

8330 commits

Author SHA1 Message Date
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
17d6d24232
Merge pull request #5680 from epage/unstable
docs(complete): Specify the compatibility guarentees
2024-08-16 09:53:35 -05:00
Ed Page
23fb0568a8
Merge pull request #5679 from epage/api
feat(complete): Make `Shells` more flexible
2024-08-16 09:46:45 -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
b2c3126a4d docs(complete): Specify the compatibility guarentees 2024-08-16 09:34:58 -05:00
Ed Page
97deaf4194 chore: Release 2024-08-15 16:42:20 -05:00
Ed Page
bfa8d01d2a docs: Update changelog 2024-08-15 16:42:13 -05:00
Ed Page
679fb1d2b3
Merge pull request #5675 from Noratrieb/patch-1
feat: Explicitly list items to re-export from derive
2024-08-15 16:41:05 -05:00
nora
9b0aa0924b feat: Explicitly list items to re-export from derive
This allows rustc to give a nice note about activating
the derive feature when it has not been activated.
2024-08-15 22:40:40 +02:00
Ed Page
d5a982fc35
Merge pull request #5676 from epage/fix
refactor(complete): Misc code cleanup for dynamic completions
2024-08-15 15:16:21 -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
70d833418b
Merge pull request #5669 from epage/reorg
fix(complete): Correct version check
2024-08-12 08:34:55 -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
2d8138a471
Merge pull request #5666 from epage/dyn
fix(complete)!: Remove unused CommandCompleter trait method
2024-08-10 21:34:45 -05:00
Ed Page
158e7161aa fix(complete)!: Remove unused CommandCompleter trait method 2024-08-10 21:27:02 -05:00
Ed Page
2633817b19
Merge pull request #5665 from epage/cmd
fix(complete)!: Put CompleteCommand behind unstable-command
2024-08-10 20:58:46 -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
02a2855058
Merge pull request #5664 from epage/ps
fix(complete)!: Dont assume powershell on Windows
2024-08-10 20:14:40 -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
dcdfda7a1b
Merge pull request #5663 from epage/dyn
fix(complete)!: Error, rather than default, on unknown shell
2024-08-10 20:02:08 -05:00
Ed Page
0d7cb9eeec fix(complete)!: Error, rather than default, on unknown shell 2024-08-10 19:54:49 -05:00
Ed Page
93e050b0b7
Merge pull request #5662 from epage/register
fix(complete)!: Adjust built-in completion CLI
2024-08-10 19:49:53 -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
ce56785427
Merge pull request #5661 from epage/sort
fix(complete): Ensure bash does not sort, we do
2024-08-10 19:30:47 -05:00
Ed Page
3ec980e7ad
Merge pull request #5659 from epage/e
refactor(complete): Organize around completion UI
2024-08-10 19:23:35 -05:00
Ed Page
873824773b
Merge pull request #5658 from epage/snap
test(complete): Normalize snapshot format
2024-08-10 19:02:00 -05:00
Ed Page
8cb0e7fdaf test(complete): Normalize snapshot format 2024-08-10 18:37:01 -05:00
Ed Page
34c86159a9 fix(complete): Ensure bash does not sort, we do 2024-08-10 18:31:30 -05:00