Implemented ExecNoBlock command support too. This really would've fit into one commit.

This commit is contained in:
Schrottkatze 2022-07-01 12:11:09 +02:00
parent 4581e8972e
commit cedebb4b6d
2 changed files with 8 additions and 4 deletions

View file

@ -96,12 +96,16 @@ fn run_instruction(instruction: &str, display: &XDisplay) {
"String" => {
println!("Strings are currently not supported.");
}
"ExecBlock" => {
"ExecBlock" | "ExecNoBlock" => {
let mut command = Command::new(instruction[1]);
for arg in &instruction[2..] {
command.arg(arg);
}
command.status();
if instruction[0] == "ExecBlock" {
command.status();
} else {
command.spawn();
}
}
c => {
panic!("Unknown command {:?}", instruction)