forked from mirrors/deskwhich
Improve name matching
This commit is contained in:
parent
b5d8342696
commit
e73783b1ba
1 changed files with 2 additions and 1 deletions
|
@ -29,7 +29,8 @@ fn main() {
|
|||
};
|
||||
for file in files {
|
||||
let desktop_file = format!("{}", file.as_ref().unwrap().file_name().into_string().unwrap());
|
||||
if desktop_file.contains(&cli.search) {
|
||||
let mut name = desktop_file.split(".");
|
||||
if name.find(|x| *x == cli.search).is_some() {
|
||||
let path = file.as_ref().unwrap().path();
|
||||
let out = if cli.show_tilde {
|
||||
format!("{}", path.display().to_string().replace(&home, "~"))
|
||||
|
|
Loading…
Reference in a new issue