Skip to content

Conversation

@yerlaser
Copy link

@yerlaser yerlaser commented Dec 11, 2024

Resolves: #1670

@yerlaser yerlaser changed the title Document how to disable automatic alphabetical sorting in custom comp… Document how to disable automatic sorting in custom completions Dec 11, 2024
@ysthakur
Copy link
Member

ysthakur commented Dec 11, 2024

There's also case_sensitive, positional, and completion_algorithm options that would be good to mention. I'm not a fan of the fact that positional exists at all, but if we're documenting the other options, it should probably be documented too. Also not a fan of the fact that it's called completion_algorithm here rather than algorithm, like in $env.config.completions but we can update the docs later if we change that name.

@NotTheDr01ds
Copy link
Contributor

NotTheDr01ds commented Dec 12, 2024

not a fan of the fact that it's called completion_algorithm here rather than algorithm

Lol - I noticed that as well. At first I thought you had added that in your recent PR and was going to suggest changing it before it went public in 0.101, but that's when I realized that it went back way further than your submission :-)

@NotTheDr01ds
Copy link
Contributor

NotTheDr01ds commented Dec 12, 2024

@yerlaser Thanks for taking a first try at this! Unfortunately it's going to need a more systemic change to the chapter. Keep in mind that we start off near the top of the chapter talking about how the completer must return a list. I'll take the blame for that, as I didn't even know about the record return type when I wrote it.

But as @ysthakur mentioned, the differences between the list and record are going to need to be discussed to close #1670, rather than just a section on how to sort alphabetically.

@yerlaser
Copy link
Author

Sure, that's fair enough. I'll close this PR then.
Thank you!

@yerlaser yerlaser closed this Dec 12, 2024
@yerlaser yerlaser deleted the patch-1 branch December 12, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

record-return from custom command completers

3 participants