Skip to content

Commit 5eb52e3

Browse files
committed
minor #5031 Reworded the note about Windows console and output coloring (javiereguiluz)
This PR was merged into the 2.3 branch. Discussion ---------- Reworded the note about Windows console and output coloring | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3+ | Fixed tickets | - Two changes: * The note about *"Windows + Console colors"* is moved to the section that explains console colors. * The note itself is reworded to be a bit more friendly. Commits ------- ec85112 Suggested ConEmu in addition to ANSICON to solve the Windows coloring limitation 71f30a2 Minor rewording 59624f6 Reworded the note about Windows console and output coloring
2 parents df72862 + ec85112 commit 5eb52e3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

components/console/introduction.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ You can install the component in 2 different ways:
2020
* :doc:`Install it via Composer </components/using_components>` (``symfony/console`` on `Packagist`_);
2121
* Use the official Git repository (https://github.com/symfony/Console).
2222

23-
.. note::
24-
25-
Windows does not support ANSI colors by default so the Console component detects and
26-
disables colors where Windows does not have support. However, if Windows is not
27-
configured with an ANSI driver and your console commands invoke other scripts which
28-
emit ANSI color sequences, they will be shown as raw escape characters.
29-
30-
To enable ANSI color support for Windows, please install `ANSICON`_.
31-
3223
Creating a basic Command
3324
------------------------
3425

@@ -124,6 +115,14 @@ This prints::
124115
Coloring the Output
125116
~~~~~~~~~~~~~~~~~~~
126117

118+
.. note::
119+
120+
By default, the Windows command console doesn't support output coloring. The
121+
Console component disables output coloring for Windows systems, but if your
122+
commands invoke other scripts which emit color sequences, they will be
123+
wrongly displayed as raw escape characters. Install the `ConEmu`_ or `ANSICON`_
124+
free applications to add coloring support to your Windows command console.
125+
127126
Whenever you output text, you can surround the text with tags to color its
128127
output. For example::
129128

@@ -506,4 +505,5 @@ Learn More!
506505
* :doc:`/components/console/console_arguments`
507506

508507
.. _Packagist: https://packagist.org/packages/symfony/console
508+
.. _ConEmu: https://code.google.com/p/conemu-maximus5/
509509
.. _ANSICON: https://github.com/adoxa/ansicon/releases

0 commit comments

Comments
 (0)