Skip to main content

config_fuzzy_matcher

Function config_fuzzy_matcher 

Source
pub fn config_fuzzy_matcher() -> &'static ArinaeMatcher
Expand description

Typo-tolerant fuzzy matcher for config-key recovery suggestions.

Config lookup failures should help with misspellings like ui.formt -> ui.format, but they should still stay narrower than broad search-oriented matching. Callers are expected to pair this matcher with explicit ranking such as same-namespace and last-segment preference.

ยงExamples

use osp_cli::core::fuzzy::config_fuzzy_matcher;
use skim::fuzzy_matcher::FuzzyMatcher;

assert!(config_fuzzy_matcher()
    .fuzzy_match("ui.format", "ui.formt")
    .is_some());