mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 15:01:16 -03:00
builtin set_color: fix inconsistent output in --print-colors
fish -c 'set_color --print-colors --background blue' |xxd does not print color enabling sequences but does print *disabling* sequences. There's no need for that.
This commit is contained in:
@@ -78,7 +78,7 @@ fn print_colors(
|
||||
}
|
||||
}
|
||||
outp.write_wstr(color_name);
|
||||
if !bg.is_none() {
|
||||
if streams.out_is_terminal() && !bg.is_none() {
|
||||
// If we have a background, stop it after the color
|
||||
// or it goes to the end of the line and looks ugly.
|
||||
outp.write_command(ExitAttributeMode);
|
||||
|
||||
Reference in New Issue
Block a user