From 07e37937845f470bdcb3ae27b1e273b37b87e470 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 4 Oct 2022 10:33:00 +0100 Subject: [PATCH] env var docs --- docs/source/console.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/source/console.rst b/docs/source/console.rst index 75f0618d..28b47ad1 100644 --- a/docs/source/console.rst +++ b/docs/source/console.rst @@ -420,6 +420,11 @@ Rich respects some standard environment variables. Setting the environment variable ``TERM`` to ``"dumb"`` or ``"unknown"`` will disable color/style and some features that require moving the cursor, such as progress bars. -If the environment variable ``NO_COLOR`` is set, Rich will disable all color in the output. +If the environment variable ``FORCE_COLOR`` is set, then color/styles will be enabled regardless of the value of ``TERM``. This is useful on CI systems which aren't terminals but can display ansi escape sequences none-the-less. -If ``width``/``height`` arguments are not explicitly provided as arguments to ``Console`` then the environment variables ``COLUMNS``/``LINES`` can be used to set the console width/height. ``JUPYTER_COLUMNS``/``JUPYTER_LINES`` behave similarly and are used in Jupyter. +If the environment variable ``NO_COLOR`` is set, Rich will disable all color in the output. This takes precedence over ``FORCE_COLOR``. See `no_color `_ for details. + +.. note:: + The ``NO_COLOR`` environment variable removes _color_ only. Styles such as bold / italic etc. are preserved. + +If ``width`` / ``height`` arguments are not explicitly provided as arguments to ``Console`` then the environment variables ``COLUMNS``/``LINES`` can be used to set the console width/height. ``JUPYTER_COLUMNS``/``JUPYTER_LINES`` behave similarly and are used in Jupyter.