pub fn query_mime_entry(mime_type: &str) -> Option<PathBuf> {
    bossy::Command::impure_parse("xdg-mime query default")
        .with_arg(mime_type)
        .run_and_wait_for_str(|out_str| {
            log::debug!("query_mime_entry got output {:?}", out_str);
            if !out_str.is_empty() {
                Some(PathBuf::from(out_str.trim()))
            } else {
                None
            }
        })
        .ok()?
}
// Detects which .desktop file contains the data on how to handle a given
// mime type (like: "with which program do I open a text/rust file?")
Detects which .desktop file contains the data on how to handle a given
mime type (like: "with which program do I open a text/rust file?")
Detects which . desktop file contains the data on how to handle a given mime type ( like : " with which program do I open a text / rust file? " )
pub fn query_mime_entry(mime_type: &str) -> Option<PathBuf> {
    bossy::Command::impure_parse("xdg-mime query default")
        .with_arg(mime_type)
        .run_and_wait_for_str(|out_str| {
            log::debug!("query_mime_entry got output {:?}", out_str);
            if !out_str.is_empty() {
                Some(PathBuf::from(out_str.trim()))
            } else {
                None
            }
        })
        .ok()?
}
pub fn query_mime_entry ( mime_type : & str ) -> Option < PathBuf > { bossy :: Command :: impure_parse ( " " ) . with_arg ( mime_type ) . run_and_wait_for_str ( | out_str | { log :: debug ! ( " " out_str ) ; if ! out_str . is_empty ( ) { Some ( PathBuf :: from ( out_str . trim ( ) ) ) } else { None } } ) . ok ( ) ? }
Detects which .desktop file contains the data on how to handle a given
mime type (like: "with which program do I open a text/rust file?")
Detects which . desktop file contains the data on how to handle a given mime type ( like : " with which program do I open a text / rust file? " )
mime_type
&str