scy, Trying out bat (the cat(1) alternative) for the first time, and … I dunno, the flushing behavior seems bonkers.
I assume it's because stdout and stderr end up in separate places, and maybe cat isn't innocent here either, but having the output split inside of an escape code (note the "31m") looks like there's something really wrong.
("bar" does not exist; that's on purpose to produce an error message.)
#Unix #Linux #CLI #bat #batcat
Same command; this time, the error message is printed below the license.
Same command. This time, the red "[bat error]" is printed first, followed by (without a line break) the first line of the license, followed by the rest of the license as normal. After the end of the license there's the colon that would normally come after the "[bat error]", followed by the rest of the error message.
Same command. This time, the license is printed first. The last line of the license, which normally contains just the word "software", followed by a period, now has an additional empty line before it and is missing the "s". Below it, there's a line containing "31m[bat error]", followed by the rest of the error message.