Question

Related to Colored Output with Cygwin Commands on cmd. By adding cygwin to my system path, I can display colors in cmd.exe with

ls --color=auto

To change the colors of the files and folders, I would edit .bashrc or .dircolors.db on linux. However, editing the cygwin equivalents of these files seems to have no effect on the output in cmd.exe, even though they do affect the cygwin shell. Does anyone know how to edit the colors of the output from ls in cmd?

(Also, I think it would be helpful if someone could grab the attention of the person answering the question I linked above. I don't have enough reputation to comment on his/her answer, so if it is allowed, it would be great if someone else could.)

Was it helpful?

Solution

Unfortunately, cmd can show only its own color scheme and can't be controlled with .bashrc or any other Cygwin thing in any way. To change its color scheme, you can click with right mouse button on its title bar, choose 'properties' and navigate to 'colors' tab:

Colors
(screenshot taken from https://superuser.com/a/199768/219397)

If you need to share your settings across multiple computers, you can create a .reg file that changes these values directly in Windows Registry. These values are stored in HKEY_CURRENT_USER/Console/ and HKEY_CURRENT_USER/Software/Microsoft/Command Processor.

What I wholeheartedly recommend though is to not use cmd.exe and use MinTTY instead:

  • it understands .bashrc
  • it resizes nicely
  • it supports UTF8
  • works nicely with packages installed with Cygwin (python etc.)
  • it supports window transparency
  • finally, it lets you change color scheme through .minttyrc (or GUI dialogs)

Here is an example how it looks like:

MinTTY

OTHER TIPS

use the cygwin dircolors -c to get the database. remove the quotes and trailing ';' then do a set LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33...blabblab....spx=00;36:.xspf=00;36:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top