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:
committed by
Kenny Levinsen
parent
d69e941ec1
commit
90ffa7df27
@@ -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 _ =
|
||||
|
||||
Reference in New Issue
Block a user