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

Re: Consider escaping special characters like 'less' does

From
Jeff King <peff@peff.net>
Date
Oct 16, 2017, 22:58 UTC
Message-ID
<20171016225816.mowrldmfkx6q7ape@sigill.intra.peff.net>
In-Reply-To
<87po9m3e3e.fsf@linux-m68k.org>
On Tue, Oct 17, 2017 at 12:47:01AM +0200, Andreas Schwab wrote:
Show 8 quoted lines
> On Okt 16 2017, Jeff King <peff@peff.net> wrote:
> 
> > I can't help but feel this is the tip of a larger iceberg, though. E.g.,
> > what about characters outside of the terminal's correct encoding? Or
> > broken UTF-8 characters?
> 
> Or correctly encoded UTF-8 characters that look confusing?  Or blobs
> with embedded escape sequences?

Yes, leaving ESC unfiltered here made me hesitate, too. We must allow it to show colors, but showing diffs with raw terminal codes can be quite confusing.

My general advice on committing unprintable characters is: don't.
-Peff
Previous: Andreas SchwabNext: Junio C Hamano
Message 9 of 13 in “Consider escaping special characters like 'less' does”
  1. Joris ValetteOct 15, 2017
  2. Jason PyeronOct 15, 2017
  3. Andreas SchwabOct 15, 2017
  4. Joris ValetteOct 15, 2017
  5. Jeff KingOct 15, 2017
  6. Joris ValetteOct 15, 2017
  7. Jeff KingOct 16, 2017
  8. Andreas SchwabOct 16, 2017
  9. Jeff KingOct 16, 2017
  10. Junio C HamanoOct 17, 2017
  11. Jeff KingOct 17, 2017
  12. Jason PyeronOct 22, 2017
  13. Jeff KingOct 23, 2017

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.