add dirty check to git prompt
1 files changed, 11 insertions(+), 0 deletions(-) M src/git.rs
M src/git.rs => src/git.rs +11 -0
@@ 8,7 8,18 @@ pub fn git<W: Write>(mut w: W) -> Result<(), Error> { { Ok(abbrev_ref) if abbrev_ref.status.success() => { write!(w, "(")?; w.write_all(abbrev_ref.stdout.trim_ascii())?; if !Command::new("git") .args(["diff", "--no-ext-diff", "--exit-code", "--quiet"]) .output() .ok() .map_or(false, |output| output.status.success()) { write!(w, "*")?; } write!(w, ") ") } _ => Ok(()),