Skip to content

Reworded the note about Windows console and output coloring #5031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 14, 2015
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions components/console/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ You can install the component in 2 different ways:
* :doc:`Install it via Composer </components/using_components>` (``symfony/console`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/Console).

.. note::

Windows does not support ANSI colors by default so the Console component detects and
disables colors where Windows does not have support. However, if Windows is not
configured with an ANSI driver and your console commands invoke other scripts which
emit ANSI color sequences, they will be shown as raw escape characters.

To enable ANSI color support for Windows, please install `ANSICON`_.

Creating a basic Command
------------------------

Expand Down Expand Up @@ -124,6 +115,14 @@ This prints::
Coloring the Output
~~~~~~~~~~~~~~~~~~~

.. note::

By default, the Windows command console doesn't support output coloring. The
Console component disables output coloring for Windows systems, but if your
commands invoke other scripts which emit color sequences, they will be
wrongly displayed as raw escape characters. Install the free `ANSICON`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they will display as raw escaped characters.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look grammatically correct to me:

they will display as raw escaped characters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note should mention both ANSICON and ConEmu.

ConEmu might be a better solution btw, because ANSICON is flagged as malware by several antivirus tools because of the way it works (it intercepts the CMD buffer). ConEmu does not suffer from this, because it is a terminal on its own (embedding any shell in it, be it CMD, Powershell, GitBash, etc...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your comment. I've added ConEmu as the first recommended application.

application to add coloring support to your Windows command console.

Whenever you output text, you can surround the text with tags to color its
output. For example::

Expand Down