News for hackers. Stuff that matters.
Re:Terminal escape sequences in Git commit email field by danielheath on Sunday March 28, 2021 @10:37PM (#26617150)
By default, I'd expect data that likely came from third parties to be sanitized before output.
Re:Terminal escape sequences in Git commit email field by theamk on Monday March 29, 2021 @01:07AM (#26617888)
it was, note the twitter had you pass "--no-pager" to get cursor movement to work.

With default options, you only get colors, and this is pretty safe.

Re:Terminal escape sequences in Git commit email field by ryan-c on Monday March 29, 2021 @04:46AM (#26618956)
It's a bit more complicated than that. For example, if you do

git log --format=%ae | sort -u

the cursor movement sequences will be preserved.

I haven't delved too deeply into what git actually does here in terms of processing for "pager" output vs not.

Re:Terminal escape sequences in Git commit email field by ryan-c on Monday March 29, 2021 @05:20AM (#26619141)
...and for this "display some art" hack specifically, it looked like it can be made to work with plain git log by using `\r` characters as newlines in addition to the escape sequences, but I haven't tested that much.
Re:Terminal escape sequences in Git commit email field by enriquto on Monday March 29, 2021 @12:52AM (#26617808)
Sure, sure, but why would such a sanitization remove useful things like terminal drawing codes? That would be untoward.