feat: range substitution for typos

This commit is contained in:
iff 2023-08-11 00:41:16 +02:00
parent b991214729
commit 2a5fa8a950
4 changed files with 102 additions and 53 deletions

View file

@ -46,7 +46,7 @@ pub fn get_best_match_file(input: &str) -> Option<String> {
})
.collect::<Vec<String>>();
let best_match = find_similar(&exit_dir, dir_files);
let best_match = find_similar(&exit_dir, &dir_files);
best_match.as_ref()?;
input = format!("{}/{}", input, best_match.unwrap());