git/list[1] front-page[2] threads[3] people[4] search[5] about
 

ANSI sequences produced on non-ANSI terminal

From
TWThe Grey Wolf <greywolf@starwolf.com>
Date
Sep 23, 2021, 05:21 UTC
Message-ID
<20210923052122.2F655CE@eddie.starwolf.com>

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
	Logged on to a hard terminal and ran 'git status .' and
	'git pull'.
What did you expect to happen? (Expected behavior)
	I expected that colour sequences would not be output, or at least
	not hardcoded to ANSI standard.  In the case of 'pull', I expected
	that the stats would be just printed using <string>\r.
What happened instead? (Actual behavior)
	I got escape sequences that made the output unreadable.
What's different between what you expected and what actually happened?
	One produces mangled ouptut and the other doesn't.
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. :)

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info]
git version:
git version 2.32.0
cpu: amd64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: NetBSD 9.99.88 NetBSD 9.99.88 (EDDIE) #16: Tue Aug 31 19:14:47 PDT 2021  greywolf@eddie.starwolf.com:/sys/arch/amd64/compile/EDDIE amd64
compiler info: gnuc: 10.3
libc info: no libc information available (actually there's a LOT of it,
	but I'm not sure you really want it -- please let me know if you do).
$SHELL (typically, interactive shell): /bin/bash
$TERM: wy60
[Enabled Hooks]
	I don't know enough about git yet to use these.
Next: Jeff King
Message 1 of 23 in “ANSI sequences produced on non-ANSI terminal”
  1. The Grey WolfSep 23, 2021
  2. Jeff KingSep 23, 2021
  3. Junio C HamanoSep 23, 2021
  4. Randall S. BeckerSep 23, 2021
  5. Kevin DaudtSep 25, 2021
  6. config: add an includeIf.env{Exists,Bool,Is,Match}Ævar Arnfjörð Bjarmason, Sep 24, 2021
  7. Jeff KingSep 24, 2021
  8. Junio C HamanoSep 24, 2021
  9. Jeff KingSep 24, 2021
  10. Junio C HamanoSep 27, 2021
  11. Jeff KingSep 27, 2021
  12. Randall S. BeckerSep 27, 2021
  13. Jeff KingSep 27, 2021
  14. Randall S. BeckerSep 27, 2021
  15. Ævar Arnfjörð BjarmasonSep 27, 2021
  16. Jeff KingSep 28, 2021
  17. Ævar Arnfjörð BjarmasonSep 28, 2021
  18. Jeff KingSep 28, 2021
  19. Ævar Arnfjörð BjarmasonSep 28, 2021
  20. Junio C HamanoSep 28, 2021
  21. GreywolfSep 24, 2021
  22. Jeff KingSep 25, 2021
  23. GreywolfOct 1, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.