mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:16:32 +02:00
This reverts commit fe0fc8d5e1
.
This commit is contained in:
@ -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()
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user