4 ms·
This works better if there are distinct escape sequences to mark the start and end of stderr output, as in DomTerm (http://domterm.org/Wire-byte-protocol.html#S
by Per_Bothner 8y ago
This works better if there are distinct escape sequences to mark the start and end of stderr output, as in DomTerm (http://domterm.org/Wire-byte-protocol.html#Special-sequences-sent-by-back-end-and-handled-by-DomTerm http://domterm.org/Wire-byte-protocol.html#Special-sequences...). I created a fork (https://github.com/PerBothner/stderred https://github.com/PerBothner/stderred) of stderrred: If DOMTERM is set, then it uses the DomTerm-specific escape sequences. This has two advantages:
- If the error message has ANSI escape sequences (like gcc does), then you get an ugly initially-red output line.
- You can do fancier styling with CSS, since the DomTerm escape sequence creates an element explicitly marked as error output, which is more semantically meaningful than "red".
- basicer 8y agoNeat! We were actually considering doing something like this with custom CSI sequences. Glad to see someone else has already picked some sensible ones.