Commit graph

218 commits

Author SHA1 Message Date
Oliver Kiddle
e40168c2fd fix(zsh): Use _default as zsh completion fallback
That is for a ValueHint of Unknown. This is consistent with bash where
compgen -f is used in such cases. In long experience with completions
distributed with zsh, the worst thing you can do is break filename
completion as that's the minimum most user's expect.
2024-10-28 21:16:38 +01:00
Vivien Maisonneuve
81d92682ce chore(complete): Add descriptions to dynamic Zsh completions 2024-10-21 15:35:19 +02:00
shannmu
fc82a3e528 feat(complete): Support to complete custom external subcommand 2024-10-08 15:49:02 +08:00
shannmu
6a09122421 test(complete): Add test for external subcommand 2024-10-07 16:29:44 +08:00
Ed Page
9e4fc9b697 test: Make shell integration tests non-blocking
We're running into the problem of tests being dependent on the version
of the command.

This has a side benefit of speeding up builds of tests because we don't
build nushell as often.
2024-09-27 13:53:12 -05:00
Ed Page
cbcbaa3ad4 style: Make clippy happy 2024-09-26 21:20:17 -05:00
Ed Page
232ee10661 fix(complete): Use existing display order for Arg/Command 2024-09-20 14:45:54 -05:00
Ed Page
cd6280fc87 fix(complete): Have shorts fallback to using long as description
It should be rare that this is helpful
2024-09-20 13:43:23 -05:00
Ed Page
8af051c439 fix(complete): When completing -[TAB], prioritize shorts 2024-09-20 13:43:23 -05:00
Ed Page
6b426dfd70 test(complete): Add another sort/filter case 2024-09-20 13:43:12 -05:00
Ed Page
8b88646129 style: Format test 2024-09-20 13:42:50 -05:00
Ed Page
89a9d79a4c fix(complete): De-duplicate built-in candidates
Part of #5058
2024-09-20 11:07:17 -05:00
Ed Page
2bd2c1262e fix(complete): Prioritize subcommands, positionals over flags 2024-09-20 10:37:53 -05:00
Ed Page
d32b1fc52d test(complete): Add sort/filter test 2024-09-20 10:37:25 -05:00
Ed Page
e08f7db03f test(complete): Fix snapshot macro 2024-09-20 10:37:15 -05:00
Ed Page
c92fca3a8f docs(complete): Clarify CompleteEnv's Shell trait 2024-09-17 15:16:32 -05:00
Ed Page
5d7c16c60e fix(complete): Adjust how IFS is passed to clap
No idea why using passing along `IFS` isn't workong on my machine (but is for tests).

Fixes #5730
2024-09-17 14:54:11 -05:00
Ed Page
6b7aa3d490
Merge pull request #5628 from mart-mihkel/complete_hyphen
Support `allow_hyphen_values` in native completions
2024-09-05 09:17:05 -05:00
mart-mihkel
fbec05e639 refactor(complete): Fix typo in hyhpen 2024-09-05 15:15:18 +03:00
mart-mihkel
b7cfbdcf96 feat(complete): Native support for hyphen values 2024-09-05 15:15:14 +03:00
mart-mihkel
1d97c293ba test(complete): Test cases for allow_hyphen_values 2024-09-05 15:07:46 +03:00
Ed Page
e2d336b95f fix(complete): Put clap in chage of Fish ordering 2024-09-04 14:28:03 -05:00
Ed Page
059db0c139 docs(complete): Clarify what flags we're using 2024-09-04 14:26:44 -05:00
Ed Page
931d9acb71 refactor(complete): Make it easier to compare tests 2024-09-04 12:42:16 -05:00
Ed Page
5286385dac test(complete): Verify space in completed value 2024-09-04 12:41:01 -05:00
Ed Page
c3e5d16183 test(complete): Verify prefix completions 2024-09-04 12:41:01 -05:00
Ed Page
a8c8268946 test(complete): Run completion tests in parallel
This leaves out bash's tests because we seem to be hittin race
conditions with them in CI when split.
2024-09-04 12:28:35 -05:00
Ed Page
72dda07a42 fix(complete)!: Remove CompleteCommand
This just has too many caveats to be worth maintaining
2024-08-28 21:29:12 -05:00
Ed Page
d51922c79e test(complete): Use more snapshotting 2024-08-28 21:29:05 -05:00
Ed Page
b04bf72436 fix(complete)!: Be consistent in value language 2024-08-22 12:29:48 -05:00
Ed Page
84252b7123 fix(complete): Allow completing '.' 2024-08-21 15:06:46 -05:00
Ed Page
eded64a13b test(complete): Verify PathCompleter::dir 2024-08-21 15:04:57 -05:00
Ed Page
bb6493e890 feat(complete): Offer - as a path option 2024-08-21 14:24:16 -05:00
Ed Page
49b8108f8c feat(complete): Add PathCompleter 2024-08-21 14:11:52 -05:00
Ed Page
82a360aa54 feat(complete): Add ArgValueCompleter 2024-08-21 14:11:52 -05:00
Ed Page
431e2bc931 test(complete): Ensure ArgValueCandidates get filtered 2024-08-21 13:52:13 -05:00
Ed Page
9bef07708d test(complete): Simplify ArgValueCandidates test 2024-08-21 13:51:25 -05:00
Ed Page
5f1eb968b4 test(complete): Split ValueHint testing from value completion 2024-08-21 13:45:13 -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
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
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
de723aaf8a fix(complete)!: Flatten in prep for stabilization 2024-08-16 10:35:07 -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
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