From 507de45d40b37d67479c8a12176e4516f210bf64 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Thu, 4 Mar 2021 11:22:14 -0600 Subject: [PATCH] Revert "add config: prompt_color_enabled = true (#3115)" (#3127) This reverts commit fe0fc8d5e17231808cd7b718155adca4b8fbaa86. --- crates/nu-cli/src/cli.rs | 19 +++++-------------- docs/sample_config/config.toml | 1 - 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/crates/nu-cli/src/cli.rs b/crates/nu-cli/src/cli.rs index 0ff2354842..121e01e7d7 100644 --- a/crates/nu-cli/src/cli.rs +++ b/crates/nu-cli/src/cli.rs @@ -218,20 +218,11 @@ pub async fn cli(mut context: EvaluationContext) -> Result<(), Box> { } }; - let config = config::config(Tag::unknown()); - let prompt = match config - .unwrap_or_default() - .get("prompt_color_enabled") - .map(|s| s.value.is_true()) - .unwrap_or(true) - { - true => colored_prompt.to_owned(), - false => { - if let Ok(bytes) = strip_ansi_escapes::strip(&colored_prompt) { - String::from_utf8_lossy(&bytes).to_string() - } else { - "> ".to_string() - } + let prompt = { + if let Ok(bytes) = strip_ansi_escapes::strip(&colored_prompt) { + String::from_utf8_lossy(&bytes).to_string() + } else { + "> ".to_string() } }; diff --git a/docs/sample_config/config.toml b/docs/sample_config/config.toml index 3ac83d1252..2c3a326094 100644 --- a/docs/sample_config/config.toml +++ b/docs/sample_config/config.toml @@ -68,7 +68,6 @@ edit_mode = "emacs" # vi, emacs auto_add_history = true bell_style = "audible" # audible, none, visible color_mode = "enabled" # enabled, forced, disabled -prompt_color_enabled = true tab_stop = 4 [textview]