Revert "add config: prompt_color_enabled = true (#3115)" (#3127)

This reverts commit fe0fc8d5e1.
This commit is contained in:
Darren Schroeder 2021-03-04 11:22:14 -06:00 committed by GitHub
parent fe0fc8d5e1
commit 507de45d40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 15 deletions

View file

@ -218,20 +218,11 @@ pub async fn cli(mut context: EvaluationContext) -> Result<(), Box<dyn Error>> {
}
};
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()
}
};

View file

@ -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]