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