turn off default prompt styling (bold) to prevent leakage (#615)

This commit is contained in:
Darren Schroeder 2023-07-31 14:39:20 -05:00 committed by GitHub
parent 0b9cb4718a
commit ed5e48e537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,8 +256,7 @@ impl Painter {
// print our prompt with color // print our prompt with color
if use_ansi_coloring { if use_ansi_coloring {
self.stdout self.stdout
.queue(SetForegroundColor(prompt.get_prompt_color()))? .queue(SetForegroundColor(prompt.get_prompt_color()))?;
.queue(SetAttribute(Attribute::Bold))?;
} }
self.stdout self.stdout
@ -270,22 +269,22 @@ impl Painter {
if use_ansi_coloring { if use_ansi_coloring {
self.stdout self.stdout
.queue(SetForegroundColor(prompt.get_indicator_color()))? .queue(SetForegroundColor(prompt.get_indicator_color()))?;
.queue(SetAttribute(Attribute::Bold))?;
} }
self.stdout.queue(Print(&coerce_crlf(prompt_indicator)))?; self.stdout.queue(Print(&coerce_crlf(prompt_indicator)))?;
if use_ansi_coloring { if use_ansi_coloring {
self.stdout self.stdout
.queue(SetForegroundColor(prompt.get_prompt_right_color()))? .queue(SetForegroundColor(prompt.get_prompt_right_color()))?;
.queue(SetAttribute(Attribute::Bold))?;
} }
self.print_right_prompt(lines)?; self.print_right_prompt(lines)?;
if use_ansi_coloring { if use_ansi_coloring {
self.stdout.queue(ResetColor)?; self.stdout
.queue(SetAttribute(Attribute::Reset))?
.queue(ResetColor)?;
} }
self.stdout self.stdout