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

Re: ANSI sequences produced on non-ANSI terminal

From
GGreywolf <greywolf@starwolf.com>
Date
Oct 1, 2021, 23:17 UTC
Message-ID
<c6c853d8-990a-2085-5e91-ced12536c125@starwolf.com>
In-Reply-To
<YU64WQOg/zY7P+Gh@coredump.intra.peff.net>
On 9/24/2021 22:49, Jeff King wrote:
Show 5 quoted lines
> OK, that makes things a bit easier. The colors, as you noticed, can be 
> disabled by config. The other thing you're seeing is ANSI ESC[K, which is 
> used to clear to the end of line. We use this in a couple places, notably 
> when relaying progress lines from the server (with the "remote:" prefix) 
> which may use carriage-returns to overwrite lines.

Those would be some of the culprits. I'll have to do a 'script' and see what it is spitting out.

> Anyway, there's no config option to disable that. However, we do disable
> it if TERM is empty or set to "dumb" (and instead just write some extra
> spaces to clear out the line). So that may be an option, though of course
> setting TERM=dumb may affect other programs you use.

Editors, in particular, tend not to like interacting with TERM=dumb as they have no idea how to behave around one ("I need CE and UP" comes to mind).

> I don't think it would be unreasonable to have a config option to select 
> whether we use the ANSI or dumb-term version.

GIT_TERM might be an option to override TERM, but I am loath to actually suggest YAEV.

> Nah, it sounds like you actually set the variables correctly. We've just 
> assumed that we can get by with ANSI codes as a lowest common denominator 
> in the modern world, without having to resort to all the complexities of 
> using a terminfo library. It's worked pretty well so far. ;)

Laughing out loud at that. Part of me is apologetic to be The Weird Kid. The other part of me is looking for more ways to be weird.

Thank you for taking a look at this.
> 
> -Peff
> 
				Cheers,
				--*greywolf;
Previous: Jeff King
Message 23 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.