lnchr 0.2.2

A fuzzy terminal app launcher
1
2
3
4
5
6
7
8
9
10
11
12
use std::os::unix::fs::PermissionsExt;

pub trait IsExecutable {
    fn is_executable(&self) -> bool;
}

impl IsExecutable for std::path::Path {
    fn is_executable(&self) -> bool {
        self.metadata()
            .is_ok_and(|m| m.is_file() && m.permissions().mode() & 0o111 != 0)
    }
}