delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:references | |
:mime-version:content-type:in-reply-to; q=dns; s=default; b=KZ+J | |
MIHvSc5mozdiVA+wIrXC9CWWO5jBCBJD4v24Zofk825r5k/pAEessoliN1YAYUGv | |
fN04quYq3A1XfWYdaZd2LYmLgbDXkVwAcQ7TN+RZfQxvQHmZRsYg28B7ANjwl0n/ | |
o+xvvOXZlx7iOTUFI6PSSKrPA+tGi7nqxz3rYKE= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:references | |
:mime-version:content-type:in-reply-to; s=default; bh=w/4o088ldj | |
deGbWSmyyO3IuJC0M=; b=o0QzPrRglXi4GUy69nfKq5l3ViZw4D7OYmK2hewAeE | |
ZopvTSQhU4CxMH4V18XSHCXJkjVDjKxsOr7nAx1VaDpKa0MvgvVjRCyJr6Kb3NuB | |
HyrLkEeoibD3fMrH/yWqTVHzG05y8wmIsmGS+RYp8C+W/KrcclOt+uP2kCJ2evUC | |
c= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 |
X-HELO: | mail.spocom.com |
Date: | Mon, 16 Dec 2013 15:18:42 -0800 |
From: | Gary Johnson <garyjohn AT spocom DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: How to disable all syntax coloring in Cygwin/bash? |
Message-ID: | <20131216231841.GA23998@phoenix> |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <CAK=acOJfFR5LE78xWF4ZM_ZE0XZZCm41KCfKtVe8jncV5bC18A AT mail DOT gmail DOT com> <CAK=acO+6=MuLq2uL=M=WCkOEoDNZpJTArfz_0c5Eda9maYk6KA AT mail DOT gmail DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <CAK=acO+6=MuLq2uL=M=WCkOEoDNZpJTArfz_0c5Eda9maYk6KA@mail.gmail.com> |
User-Agent: | Mutt/1.5.20 (2009-06-14) |
X-IsSubscribed: | yes |
On 2013-12-16, Chris Wolf wrote: > On Mon, Dec 16, 2013 at 4:58 PM, Chris Wolf wrote: > > I just installed a recent release of Cygwin and notice that it now > > features syntax highlighting. Is there a way to totally disable this? > > All I want is be able to set the foreground/background colors via the > > Windoze way of right clicking on the frame and I don't want the out of > > "ls" colorized nor for the colors to change to some weird settings > > upon invoking "vi". I want them the same under all conditions. > > > > I checked the documentation, FAQ and message archives of this list, > > but most of the questions were about how to *enable* colors or > > customize them. > > > > I actually did figure a round-about way of doing this via setting some > > env vars and setting (or unsetting aliases). Unfortunately the laptop > > I did this on died, so I'm starting from scratch. > > > > (P.S. this could be bash issue and not exactly Cygwin, although older > > releases of Cygwin did not have this "problem". ) > I was able to come up with something, though not sure it's the best or > what I had before. Sorry if this is obvious to most people, but to > get rid of colorized output, I added to my .bashrc: > > export LS_COLORS='' > > If $PS1 has terminal color escape codes, then replace that also with > something else, e.g.: > > export PS1="\h $ " There is no one way to enable or disable colors. In Cygwin and other Unix-like systems, each terminal application controls its use of color by its own means, independently of other applications or global settings. Colored file names in the output of 'ls' are usually there because your environment includes an alias for 'ls', "ls --color=auto". Cygwin creates a default ~/.bashrc when user accounts are created by copying /etc/defaults/etc/skel/.bashrc. In my installation, though, neither that file nor /etc/bash.bashrc contains an alias for 'ls', so I don't know where yours is coming from. In any case, you can disable it by putting unalias ls in your ~/.bashrc As you've discovered, a colored prompt is generated by PS1. PS1 defaults to something like "$ " but most distributions set it to something more useful and prettier. Cygwin does so in /etc/bash.bashrc. The fix for that is to define it yourself in your ~/.bashrc, as you have done. The coloring used by 'vi' is determined by the configuration files read by vi upon startup. When compiled and installed from the original sources on Unix, vi does not use colors. To see what configuration files 'vi' is reading, run "vi --version" and look for the various vimrc files. If your 'vi' is displaying colors, they are being enabled in one of those configuration files. You can't easily prevent 'vi' from reading those configuration files, but you can unset their settings in your ~/.virc. To get rid of syntax highlighting, syntax off should do it. HTH, Gary -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |