Using cygwin I've a problem in less: I can't see colors (for example using grep --color) and I can't set the locale I'm using (LC_ALL=C). I type this command: echo òùàòùàòà | grep --color àò | sort ...
When you pipe something through less, the program usually discards color codes because it's not outputting to a TTY. So you have to add --color=always to the options for it to work. ls -l ...
Both less -r (preserve terminal control sequences) and less -S (chop long lines) work well alone. But using them together breaks things. It chops too late and it wrecks the next line. Reducing ...
when I read a file in Linux with the command 'less' or 'more', how can I get the content in colors?
I use the --colour option of grep a lot, but I often use less as well. How can I pipe grep results to less and still preserve the coloring. (Or is that possible?) grep "search-string" -R * --colour | ...