Enable colors in GCC 4.9

Bug #1324901 reported by Manuel López-Ibáñez
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
New
Undecided
Unassigned

Bug Description

GCC 4.9 supports colored diagnostics. Enabling them requires either using -fdiagnostics-color=auto or defining GCC_COLORS.

Ubuntu could enable colors in gcc by default just for those users who already use colors for ls/grep by patching the file /etc/skel/.bashrc with:

@@ -72,20 +72,21 @@
 # enable color support of ls and also add handy aliases
 if [ -x /usr/bin/dircolors ]; then
     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
     alias ls='ls --color=auto'
     #alias dir='dir --color=auto'
     #alias vdir='vdir --color=auto'

     alias grep='grep --color=auto'
     alias fgrep='fgrep --color=auto'
     alias egrep='egrep --color=auto'
+ export GCC_COLORS=" "
 fi

 # some more ls aliases
 alias ll='ls -alF'
 alias la='ls -A'
 alias l='ls -CF'

 # Add an "alert" alias for long running commands. Use like so:
 # sleep 10; alert

Tags: patch
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for taking your time to report this issue and help making Ubuntu better.

I have added the "patch"-tag, and subscribed ~ubuntu-reviewers which is the team responsible for reviewing patches.

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.