1

Clink's default text output is in white. E.g. after injecting Clink, typing clinkTabTab shows:

enter image description here

If I set the cmd window to black text on white background ("Properties" → "Colors"), this is the output:

enter image description here

The second row cannot be seen, because it is white text on white background. Clink's text output remains white, ignoring the color settings for the cmd window.

How can we set Clink's output color?

Is there something alike set clink.prompt_colour=12 for output color?

Pacerier
  • 28,143

1 Answers1

3

It's not possible without 3rd-party apps.

clink doesn't insert colors into the output, it only allows the command shell to interpret them. You need to use a program which displays color output. These are mostly Linux applications because cmd.exe doesn't usually show them anyway. For example, if you install the GnuWin32 version of ls you can see color in a console which has already been injected.

First inject clink. There are several ways to do this. The other methods are listed on the clink information page:

clink.exe inject

Then you can use the command:

ls --color

To view directory listings in color.

If you also install the printf command then you can color the output of your own scripts. For example:

printf "\033[0;31mhello\33[0m, \33[0;32mworld\33[0m"

Will print 'hello' in red and 'world' in green. You could also use the GNU echo command, with the -e option, but because that is already a Windows command you'll need to use the full path to the exe every time you use it.

There are surely other programs which can do this but this is how I use it. I've written a full guide to setting this up the way I use it that you may be interested in.

Pacerier
  • 28,143
krowe
  • 5,629