Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
term: Remove `mod command`
Lorenz Leutgeb committed 8 months ago
commit edd88a59bf1f1ff39134c81f7e0aba7258ebbce7
parent 79d928551b56b9094d69268ec78d8bf778ef2f2b
3 files changed +1 -28
deleted crates/radicle-term/src/command.rs
@@ -1,19 +0,0 @@
-
use std::io::Write;
-
use std::process::{Command, Stdio};
-

-
pub fn bat<S: AsRef<std::ffi::OsStr>>(
-
    args: impl IntoIterator<Item = S>,
-
    stdin: &str,
-
) -> anyhow::Result<()> {
-
    let mut child = Command::new("bat")
-
        .stdin(Stdio::piped())
-
        .args(args)
-
        .spawn()?;
-

-
    let writer = child.stdin.as_mut().unwrap();
-
    writer.write_all(stdin.as_bytes())?;
-

-
    child.wait()?;
-

-
    Ok(())
-
}
modified crates/radicle-term/src/io.rs
@@ -10,7 +10,6 @@ use inquire::InquireError;
use inquire::{ui::Color, ui::RenderConfig, Confirm, CustomType, Password};
use zeroize::Zeroizing;

-
use crate::command;
use crate::format;
use crate::{style, Paint, Size};

@@ -288,10 +287,4 @@ where
        .with_render_config(*CONFIG);

    selection.with_starting_cursor(0).prompt()
-
}
-

-
pub fn markdown(content: &str) {
-
    if !content.is_empty() && command::bat(["-p", "-l", "md"], content).is_err() {
-
        blob(content);
-
    }
-
}
+
}

\ No newline at end of file
modified crates/radicle-term/src/lib.rs
@@ -1,7 +1,6 @@
pub mod ansi;
pub mod cell;
pub mod colors;
-
pub mod command;
pub mod editor;
pub mod element;
pub mod format;