term: Remove `mod command`
This is dead code that imports `anyhow`. On the way to removing the dependency on `anyhow` from `radicle-term`, it just seems to be a good idea to remove the cruft.
This commit is contained in:
parent
79d928551b
commit
edd88a59bf
|
|
@ -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(())
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue