/// build a shell compatible command, with escapings
build a shell compatible command, with escapings
build a shell compatible command with escapings
pub fn shell_exec_string(&self, file: &Path, args: &Option<String>) -> String {
        let map = self.replacement_map(file, args, true);
        GROUP
            .replace_all(&self.execution, |ec: &Captures<'_>| {
                do_exec_replacement(ec, &map)
            })
            .to_string()
            .split_whitespace()
            .map(|token| {
                let path = Path::new(token);
                if path.exists() {
                    if let Some(path) = path.to_str() {
                        return path.to_string();
                    }
                }
                token.to_string()
            })
            .collect::<Vec<String>>()
            .join(" ")
    }
pub fn shell_exec_string ( & self , file : & Path , args : & Option < String > ) -> String { let map = self . replacement_map ( file , args , true ) ; GROUP . replace_all ( & self . execution , | ec : & Captures < ' _ > | { do_exec_replacement ( ec , & map ) } ) . to_string ( ) . split_whitespace ( ) . map ( | token | { let path = Path :: new ( token ) ; if path . exists ( ) { if let Some ( path ) = path . to_str ( ) { return path . to_string ( ) ; } } token . to_string ( ) } ) . collect :: < Vec < String > > ( ) . join ( " " ) }
build a shell compatible command, with escapings
build a shell compatible command with escapings
&self
file
&Path
args
&Option<String>