0

I tried to run Lettuce. Normally works, however when I used:

lettuce | less

there are a lot of color commands like:

ESC[1;37m

How to get rid of that when writing into file?

For example cucumber prints nice colors in the console, and normal text in less and file.

Szymon Lipiński
  • 27,098
  • 17
  • 75
  • 77

2 Answers2

3

This should work:

$ lettuce | less -R   # keep the colors

or

$ lettuce -v 3        # remove the colors
Yichun
  • 1,192
  • 9
  • 15
0

Set the environment variable DISABLE_COLORS:

export DISABLE_COLORS=true

Any value should work, I just picked true for semantics.

tskuzzy
  • 35,812
  • 14
  • 73
  • 140