On Sat, Nov 25, 2006 at 08:18:27PM +0100, Penguin Lover Benno Schulenberg squawked: > Willie Wong wrote: > > LESS (should be -R -M --shift 5 by default) > > When doing > > export LESS="-R -M --shift 5" > > a C-file viewed with 'less' is coloured. But when doing > > export LESS="-RM --shift 5" > > not. What is being tripped up where here? > Interesting, that is probably because of the following snip from lesspipe.sh (the gentoo less filter)
# Only colorize if we know less will handle raw codes for opt in ${LESS} ; do if [[ ${opt} == "-r" || ${opt} == "-R" ]] ; then ${LESSCOLORIZER} "$1" break fi done I would probably consider that a bug worth filing on b.g.o. That snipplet assumes that options would be specified 1 per dash with no ganging, which does not fit in the old unix-style paradigm; but it also completely ignores the gnu-style options given in the man page (--raw-control-chars and --RAW-CONTROL-CHARS for -r and -R respectively) W -- You should approach relationships like chess. And preferably as Deep Blue plays it, or at least as Kasparov. Sortir en Pantoufles: up 92 days, 19:33 -- gentoo-user@gentoo.org mailing list