lesspipe.sh has some bugs: - the source code files are never colorized - the command name of torrentinfo is torrentinfo and not torrentinfo-console With my patch, it just works :) Reproducible: Always Steps to Reproduce: 1. export LESSCOLOR=always 2. less /usr/bin/lesspipe 3. no colors Actual Results: no colors Expected Results: colors
Created attachment 259613 [details, diff] Patch to fix the two bug
the torrentinfo binary has been renamed ... it isnt really "wrong" http://sources.gentoo.org/sys-apps/less/files/lesspipe.sh?r1=1.43&r2=1.44 as for colorizes, it works fine for me. $ echo 'main(){}' > test.c $ LESSCOLOR=yes less test.c
(In reply to comment #2) > the torrentinfo binary has been renamed ... it isnt really "wrong" > > http://sources.gentoo.org/sys-apps/less/files/lesspipe.sh?r1=1.43&r2=1.44 you're right, I didn't checked. > as for colorizes, it works fine for me. > $ echo 'main(){}' > test.c > $ LESSCOLOR=yes less test.c It also work for me... but for example $ LESSCOLOR=yes less /usr/bin/lesspipe.sh -> no colors with the lesspipe provided by sys-apps/less -> colors with 'my' lesspipe
Well, I tested a bit more on a "bare" system and it seems to work better than on my own system: the bash scripts are not colorized but it works for all the other files...
ok, i played with it a bit more and see what's going on. i implemented your suggestion in a slightly different way. http://sources.gentoo.org/sys-apps/less/files/lesspipe.sh?r1=1.44&r2=1.45
well done, it is much more elegant! Thanks.