diff --git a/Cargo.lock b/Cargo.lock index a9a69bf..4a6d3e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -290,7 +290,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "silver" -version = "1.0.4" +version = "1.0.5" dependencies = [ "chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index fbe09dd..97dab87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "silver" -version = "1.0.4" +version = "1.0.5" authors = ["reujab "] description = "A cross-shell customizable powerline-like prompt with icons" diff --git a/src/sh.rs b/src/sh.rs index 6555731..759d1d2 100644 --- a/src/sh.rs +++ b/src/sh.rs @@ -53,6 +53,8 @@ pub fn escape_background(shell: &str, color: &str) -> String { "zsh" => { if HEX.is_match(&color) { format!("%{{\x1b[48;2;{}m%}}", escape_hex(color)) + } else if color == "none" { + format!("%k") } else { format!("%K{{{}}}", color) }