Fixed additionnal space in command autocomplete

This commit is contained in:
Justine
2023-02-04 23:45:43 +01:00
parent b31e3d4be4
commit 90640d4e51

View File

@ -94,6 +94,8 @@ impl Search {
} }
}; };
match &self.search_type {
SearchType::FileSearch => {
let xxx = &self.search_path.clone().into_os_string().into_string().unwrap(); let xxx = &self.search_path.clone().into_os_string().into_string().unwrap();
if !&self.local_search && !res.contains(&xxx.as_str()) { if !&self.local_search && !res.contains(&xxx.as_str()) {
let return_val = format!("{} {}{}", &self.command, &self.search_path.display(), res); let return_val = format!("{} {}{}", &self.command, &self.search_path.display(), res);
@ -102,6 +104,11 @@ impl Search {
let return_val = format!("{} {}", &self.command, res); let return_val = format!("{} {}", &self.command, res);
return(return_val, res_lines); return(return_val, res_lines);
} }
},
SearchType::CmdSearch => {
return (res, res_lines);
},
}
} }
fn discriminate_search_type(input: &String) -> SearchType { fn discriminate_search_type(input: &String) -> SearchType {