Hacker News new | ask | show | jobs
by dredmorbius 164 days ago
You may also have to specify "-R" for less such that ANSI escape sequences are honoured.

(I usually invoke this when viewing jq output, a JSON data formatter / query tool.)

1 comments

True. To combat that you can define a variable LESS with default options in your config file. In my case, I have export LESS='-R --quit-if-one-screen -i' (interpret escape sequences, cat input instead of showing it in a pager if it fits on a screen, enable smart-case searching)