This commit is contained in:
steven-omaha
2022-12-02 16:40:42 +01:00
parent fc390feecb
commit 13490de0e2
5 changed files with 149 additions and 143 deletions
+24
View File
@@ -0,0 +1,24 @@
use std::os::unix::process::CommandExt;
use std::path::Path;
use std::process::Command;
use crate::Package;
pub fn run_edit_command(files: &[&Path]) {
let mut cmd = Command::new("nvim");
for f in files {
cmd.arg(f.to_string_lossy().to_string());
}
dbg!(&cmd);
cmd.exec();
}
pub fn run_install_command(diff: Vec<Package>) {
let mut cmd = Command::new("paru");
cmd.arg("-S");
for p in diff {
cmd.arg(format!("{p}"));
}
dbg!(&cmd);
cmd.exec();
}