Lex exec even when using custom opener

This fixes a few bugs I found related to custom opener.

Instead of sending the entire exec as a single argument, this properly
splits the command, trims trailing whitespaces, and lets the receiving
opener iterate over terms.
This commit is contained in:
Maxim Baz
2021-12-25 17:59:45 +01:00
committed by Kenny Levinsen
parent d69e941ec1
commit 90ffa7df27
+3 -2
View File
@@ -420,12 +420,13 @@ impl<'a> Widget for Launcher<'a> {
&self.app_opener
};
let mut lexed = shlex::split(&exec).unwrap();
let lexed = if !prefix.is_empty() {
let mut prefix = shlex::split(prefix).unwrap();
prefix.push(exec);
prefix.append(&mut lexed);
prefix
} else {
shlex::split(&exec).unwrap()
lexed
};
if !lexed.is_empty() {
let _ =