pub fn find_similar_paths(unknown: &str) -> Vec<String>Expand description
Finds similar paths for “did you mean?” suggestions.
Uses string similarity to find paths that are close to the given unknown path, helping users correct typos.
§Arguments
unknown— The unrecognized path
§Returns
A vector of similar paths, sorted by similarity (most similar first). Returns at most 3 suggestions.
§Example
use fernctl::commands::query::find_similar_paths;
let suggestions = find_similar_paths("colors.backgroud");
assert!(suggestions.contains(&"colors.background".to_string()));