implement editing of files

This commit is contained in:
steven-omaha
2022-12-02 17:33:59 +01:00
parent 5ee5aa520c
commit 81c6b04e64
3 changed files with 5 additions and 10 deletions
+2 -4
View File
@@ -1,15 +1,14 @@
use std::os::unix::process::CommandExt;
use std::path::Path;
use std::path::PathBuf;
use std::process::Command;
use crate::Package;
pub fn run_edit_command(files: &[&Path]) {
pub fn run_edit_command(files: &[PathBuf]) {
let mut cmd = Command::new("nvim");
for f in files {
cmd.arg(f.to_string_lossy().to_string());
}
dbg!(&cmd);
cmd.exec();
}
@@ -19,6 +18,5 @@ pub fn run_install_command(diff: Vec<Package>) {
for p in diff {
cmd.arg(format!("{p}"));
}
dbg!(&cmd);
cmd.exec();
}