lf 0.2.0

Locate a file in file explorer
Documentation
1
2
3
4
5
6
7
8
9
10
use std::process::{Command, Output};

pub fn open_folder_and_select_items(paths: &[&str]) -> Output {
    if paths.len() > 1 {
        println!("unix supports to select only 1 file.")
    }
    let mut cmd = Command::new("nautilus");
    cmd.arg("-s").arg(paths[0]);
    cmd.output().expect("failed to execute nautilus")
}