add nix info
1 files changed, 11 insertions(+), 0 deletions(-) M src/main.rs
M src/main.rs => src/main.rs +11 -0
@@ 9,6 9,10 @@ use std::process::Command; fn main() -> Result<(), Error> { let mut stdout = BufWriter::new(std::io::stdout()); faint(&mut stdout)?; nix(&mut stdout)?; reset(&mut stdout)?; cwd(&mut stdout)?; @@ faint(&mut stdout)?; 58,3 62,10 @@ fn git<W: Write>(mut w: W) -> Result<(), Error> { _ => Ok(()), } } fn nix<W: Write>(mut w: W) -> Result<(), Error> { if let Ok(purity) = std::env::var("IN_NIX_SHELL") { write!(w, "{purity} ")?; } Ok(()) }