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.