Search code examples
windows-7colorsterminalcygwin

Colored files in Windows terminal via Cygwin?


I have Cygwin installed on my Win7 laptop and by editing my Windows path variable I'm able to get Linux commands in my Windows command terminal. My Question is there a way to get colored file output to transfer to the Windows command line?

Through Cygwin I obviously just alias my .bashrc file, but from Googling and checking Cygwin FAQs I can't find any way to reference that file in a Windows prompt. Although 'ls --color=auto' does work, is there a way to alias this through the Windows command line in any way?


Solution

  • @Al G - Yes. I already can use commands by editing my PATH to include the Cygwin /bin directory but I was wondering if there was a way to carryover aliases. However I was able to answer my own question:

    Using naitve Windows aliasing via DOSKEY I can create an alias for ls to auto color file types like this:

    DOSKEY ls=ls --color=auto