RE: ANSI sequences produced on non-ANSI terminal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On September 23, 2021 5:55 PM, Junio C Hamano wrote:
>Jeff King <peff@xxxxxxxx> writes:
>
>> On Wed, Sep 22, 2021 at 10:21:22PM -0700, The Grey Wolf wrote:
>>
>>> Anything else you want to add:
>>> 	I searched google and the documentation as best I was able for
>>> 	this, but I am unable to find anywhere that will let me disable
>>> 	(or enable) colour for a particular term type.  Sometimes I'm on
>>> 	an xterm, for which this is GREAT.  Sometimes I'm on a Wyse WY60,
>>> 	for which this is sub-optimal.  My workaround is to disable colour
>>> 	completely, which is reluctantly acceptable, but it would be nice
>>> 	to say "If I'm on an xterm/aterm/urxvt/ansi terminal, enable
>>> 	colour or cursor-positioning, otherwise shut it off."  If this
>>> 	seems too much of a one-off to handle, fine, but most things that
>>> 	talk fancy to screens are kind enough to allow an opt-out based on
>>> 	terminal type. :)
>>
>> Git doesn't have any kind of list of terminals, beyond knowing that
>> "dumb" should disable auto-color. It's possible we could expand that
>> if there are known terminals that don't understand ANSI colors. I'm a
>> bit wary of having a laundry list of obscure terminals, though.
>>
>> If we built against ncurses or some other terminfo-aware library we
>> could outsource that, but that would be a new dependency. I'm hesitant
>> to do that even as an optional dependency given the bang-for-the-buck
>> (and certainly making it require would be right out).
>
>I was wondering if Gray Wolf can run screen on the Wyse, and then wouldn't git see TERM=screen which is pretty much ANSI if I am
not
>mistaken ;-)?

Would something like switch in .gitconfig make a difference? Like core.colourize=false. There are situations where SSH sessions come
in from automation, like Jenkins and Travis, which sets term to something other than dumb by default. Coloring makes a mess of the
output. The ability to turn off colouring off by user might be helpful.

-Randall




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux