torch/trepl

Does not support colors

junhyukoh opened this issue · 6 comments

Hi,

The current repo does not seem to support colors in some cases.
It seems that init.lua calls noColors() if tput colors gives non-zero values (my machine gives 256).
If I comment out noColors() manually, it shows colors correctly.
Do you have any idea?

hey @junhyukoh it calls noColors() only if the process return code is non-zero, i.e. the process exited with an error.

What's the output of the following in your terminal?

tput colors; echo $?

It gives the following outputs.

> tput colors
> 256
> tput colors; echo $
> 256
> $

echo $?, with the question mark.

tput colors; echo $?

> tput colors; echo $?
> 256
> 0

By the way, it seems like you fixed this recently.
I was using the previous version.
The latest one works fine.
Sorry for the confusion!

cool!