Skip to main content

exec_command

Function exec_command 

Source
pub fn exec_command(value: &str) -> Option<String>
Expand description

Turn a desktop file Exec value into a shell-quoted command line: field codes (%u, %F, …) removed and each argument quoted when it holds spaces or shell characters, so a shell-style split gives back the same arguments. An env VAR=value app wrapper is kept whole, with env as the program, so the app still gets its variables. None if nothing is left, an env wrapper names no program, or a quote is not closed.