Skip to content

Add fallback completion algorithm - #18965

Open
j-chmielewski wants to merge 23 commits into
nushell:mainfrom
j-chmielewski:fallback-completion
Open

j-chmielewski wants to merge 23 commits into
nushell:mainfrom
j-chmielewski:fallback-completion

Conversation

@j-chmielewski

Copy link
Copy Markdown

Description

Adds the fallback completion algorithm for #11211.

With completions.algorithm = "fallback", Nushell shows prefix
matches when available and falls back to fuzzy matches only when there
are no prefix matches.

User-facing changes (Release notes)

Added a "fallback" completion algorithm. It prefers prefix matches
and uses fuzzy matching only when no prefix matches exist.

Additional notes

Fixes #11211

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Hey, just a bot checking in! You edited files related to the configuration.
If you changed any of the default values or added a new config option, don't forget to update the doc_config.nu which documents the options for our users including the defaults provided by the Rust implementation.
If you didn't make a change here, you can just ignore me.

@fdncred

fdncred commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

we're working on a big completions pr right now #18791 so we probably won't look at this until after it lands.

@j-chmielewski

Copy link
Copy Markdown
Author

Alright, fingers crossed for it landing soon then. I'll keep an eye out for conflicts once it does.

@j-chmielewski

Copy link
Copy Markdown
Author

@fdncred merged main. Perhaps we could move on with this? I'll probably be able to set aside some time over the weekend if you find that any corrections are needed.

@fdncred

fdncred commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@kronberger-droid @philocalyst Please give your input on this PR.

@kronberger-droid

Copy link
Copy Markdown
Contributor

I will take a look.
But I would concentrate on making completions stable for the next release, there are still some issues we have open for it.

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.

Completion algorithm: try prefix, fallback to fuzzy if, and only if, prefix gives no results

3 participants