Unreadble output in one special case
See original GitHub issueThe content of this post is in reference to xo
, but I believe that chalk is the source of the problem/issue. This was spotted as an xo issue (sindresorhus/xo#145). I traced that back to sindresorhus/eslint-formatter-pretty and now chalk.
Copy and pasted below
I’m not sure what’s special about the output from xo, but it’s the only thing that seems to be affected. I cannot read the output without copying and pasting it somewhere. Here are a few screenshots:
Normal Output
Highlighted Output
I’ve been copying the highlighted output my editor to read it. Any idea what xo is doing that’s unique in this way? I’ve used hundreds of other cli tools including the underlying ESLint without any problems. I’ve used dozens of other programs that use chalk to print colorized output. I’ve even tried changing my local color profiles to no avail. Any help would be greatly appreciated.
For Reference
xo | tee
makes the output visible although not colorized.
This is the content of the hidden output in both screenshots:
➜ ava git:(add-test-run-duration) xo
api.js:183:2
⚠ 183:2 Unexpected todo comment. no-warning-comments
lib/assert.js:15:1
⚠ 15:1 This function has too many parameters (5). Maximum allowed is 4. max-params
lib/logger.js:94:2
⚠ 94:2 Unexpected todo comment. no-warning-comments
lib/reporters/mini.js:178:4
⚠ 178:4 Unexpected todo comment. no-warning-comments
⚠ 305:1 Unexpected todo comment. no-warning-comments
lib/test.js:42:2
⚠ 42:2 Unexpected todo comment. no-warning-comments
test/cli.js:96:3
⚠ 96:3 Unexpected todo comment. no-warning-comments
⚠ 141:3 Unexpected todo comment. no-warning-comments
test/promise.js:129:1
⚠ 129:1 Unexpected todo comment. no-warning-comments
9 warnings
System Information
OS: Ubuntu 16.04 x64
Terminal: Byobu terminal
$TERM
: screen-256color
$SHELL
: /usr/bin/zsh
[ -t 1 ] && echo yes || echo no
: yes
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
For anyone who’s made it this far down the rabbit hole and is seeing only the first
Normal
in the test listed above, see this Q/A for fixes.It took some playing for me to get this working, and in the end I aliased
tmux
toTERM=screen-256color-bce tmux
. I already hadset -g default-terminal "screen-256color"
in my .tmux.conf file.In case anyone else finds this post, first test your terminal emulator.
should print
source