mirror of
https://codeberg.org/axtlos/deskwhich.git
synced 2024-11-10 12:43:47 +01:00
Improve name matching
This commit is contained in:
parent
b5d8342696
commit
e73783b1ba
@ -29,7 +29,8 @@ fn main() {
|
|||||||
};
|
};
|
||||||
for file in files {
|
for file in files {
|
||||||
let desktop_file = format!("{}", file.as_ref().unwrap().file_name().into_string().unwrap());
|
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 path = file.as_ref().unwrap().path();
|
||||||
let out = if cli.show_tilde {
|
let out = if cli.show_tilde {
|
||||||
format!("{}", path.display().to_string().replace(&home, "~"))
|
format!("{}", path.display().to_string().replace(&home, "~"))
|
||||||
|
Loading…
Reference in New Issue
Block a user