Revert "color"

This reverts commit 729f55238e.
This commit is contained in:
a 2024-07-10 14:03:54 +02:00
parent 729f55238e
commit 7085a94fca
2 changed files with 1 additions and 27 deletions

View file

@ -1,23 +0,0 @@
**Added:**
* builtins: Added color to printx e.g. ``printx('Good', color='GREEN')``.
**Changed:**
* <news item>
**Deprecated:**
* <news item>
**Removed:**
* <news item>
**Fixed:**
* <news item>
**Security:**
* <news item>

View file

@ -2018,14 +2018,11 @@ def format_color(string, **kwargs):
return ansi_partial_color_format(string, style=style)
def print_color(string, color=None, **kwargs):
def print_color(string, **kwargs):
"""Prints a string that may contain colors. This dispatched to the shell
method of the same name. Colors will be formatted if they have not already
been.
"""
if color:
string = f'{{{color}}}{string}{{RESET}}'
if hasattr(xsh.shell, "shell"):
xsh.shell.shell.print_color(string, **kwargs)
else: