diff --git a/src/shell/job.rs b/src/shell/job.rs index 53d2bbcf7a372bb4b93494e5d404dd59476e36d2..6f5c05b63eb3cc10db8418c4ac348758cf6093c9 100644 --- a/src/shell/job.rs +++ b/src/shell/job.rs @@ -41,7 +41,7 @@ impl Job { } self.args = expanded; - self.command = self.args[0].clone().into(); + self.command = self.args.first().map_or("".into(), |c| c.clone().into()); } pub fn build_command(&mut self) -> Command {