added reset at the end of the prompt
This commit is contained in:
parent
1ed10e9a06
commit
a63d404c26
|
|
@ -35,7 +35,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
|
|||
|
||||
[[package]]
|
||||
name = "fast-git-prompt"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
dependencies = [
|
||||
"git2",
|
||||
"regex",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "fast-git-prompt"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
description = "A fast git prompt for zsh and bash."
|
||||
license = "MIT"
|
||||
repository = "https://github.com/MasterGordon/fast-git-prompt"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ pub enum Color {
|
|||
BrightMagenta,
|
||||
BrightCyan,
|
||||
BrightWhite,
|
||||
Reset,
|
||||
}
|
||||
|
||||
const ESC: &str = "\x1b";
|
||||
|
|
@ -54,6 +55,7 @@ impl Ansi for Color {
|
|||
Color::BrightMagenta => format!("{}[95m", ESC),
|
||||
Color::BrightCyan => format!("{}[96m", ESC),
|
||||
Color::BrightWhite => format!("{}[97m", ESC),
|
||||
Color::Reset => format!("{}[0m", ESC),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,8 +136,9 @@ fn main() {
|
|||
prompt = prompt.drain(..).filter(|s| !s.is_empty()).collect();
|
||||
|
||||
print!(
|
||||
"{}{}",
|
||||
"{}{}{}",
|
||||
color(config.base_color),
|
||||
prompt.join(format!("{} ", color(config.base_color)).as_str())
|
||||
prompt.join(format!("{} ", color(config.base_color)).as_str()),
|
||||
color(Some(Color::Reset))
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue