diff --git a/news/printx_color.rst b/news/printx_color.rst deleted file mode 100644 index 9de621e52..000000000 --- a/news/printx_color.rst +++ /dev/null @@ -1,23 +0,0 @@ -**Added:** - -* builtins: Added color to printx e.g. ``printx('Good', color='GREEN')``. - -**Changed:** - -* - -**Deprecated:** - -* - -**Removed:** - -* - -**Fixed:** - -* - -**Security:** - -* diff --git a/xonsh/tools.py b/xonsh/tools.py index 924fcbd8d..ebb7b7c62 100644 --- a/xonsh/tools.py +++ b/xonsh/tools.py @@ -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: