Article 5NXZJ Wrong default configuration of less(1) breaks Git and Mercurial

Wrong default configuration of less(1) breaks Git and Mercurial

by
krown
from LinuxQuestions.org on (#5NXZJ)
I'm trying the latest current, i.e. 15-RC1. After cloning some Git repository commands like 'git branch' and 'git log' don't support colored output and show it as literal escape sequences. For example: "* ESC[32mmasterESC[m". The same issue happens with Mercurial (hg) as well. Probably there are other broken programs like Git and Mercurial.

This happens because /etc/profile sets LESS="-M", probably for prompt of man(1) to look nicer. As a workaround I can set 'core.pager = less -r' in my Git configuration but I think this is wrong and can only be a temporary workaround.

I think the real solution would be teaching man(1) to run 'less -PM' by itself and not by the LESS environment variable.latest?d=yIl2AUoC8zA latest?i=ecmHaQfT5b0:UMkOikGhuNM:F7zBnMy latest?i=ecmHaQfT5b0:UMkOikGhuNM:V_sGLiP latest?d=qj6IDK7rITs latest?i=ecmHaQfT5b0:UMkOikGhuNM:gIN9vFwecmHaQfT5b0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments