I believe that to enable colour on a Windows console, you need to use an API function, which can get a bit clumsy because there isn't an equivalent to \e[0m to reset to default, so you have to retrieve the current console colour beforehand.  Windows 10 /might/ accept the ANSI escape sequences, but I'm not sure.

Gareth aka. Kit

On 22/11/2020 16:05, Sven Barth via fpc-devel wrote:
Michael Van Canneyt via fpc-devel <fpc-devel@lists.freepascal.org <mailto:fpc-devel@lists.freepascal.org>> schrieb am So., 22. Nov. 2020, 17:03:



    On Sun, 22 Nov 2020, Jonas Maebe via fpc-devel wrote:

    > On 22/11/2020 16:03, Ryan Joseph via fpc-devel wrote:
    >> What version of the trunk is this in and what's the flag to
    enable it? My trunk is maybe 30 days old and I don't see any way
    to get the colors.
    >
    > It's only enabled on Linux and Windows currently.

    Is there a switch to disable it ?
    The lazarus parser doesn't need color, it supplies it's own in the
    messages dialog.

    I looked in the help but could not see one, maybe it was forgotten.


It's only enabled if the output is to a TTY and not a pipe (analogous on Windows).

Regards,
Sven


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to