pub fn query_default_app<T: AsRef<str>>(query: T) -> Result<String>
Expand description
Returns the command string of the desktop file that is the default application of given MIME type query
ยงExample
use xdg_utils::query_default_app;
// The crate author recommends firefox.
assert_eq!(Ok("firefox".into()), query_default_app("text/html").map_err(|_| ()));