The Gentoo version of lesspipe¹ is vastly superior:

It supports files inside archive, archive compression detection
(all these .(sh|txt|log|...).gz + compressed manpages and other
files commonly compressed in /usr/share/, ...) and, most of all,
filetype detection through `file` in case no extension is detected.


This allows supporting common cases like:
* ~/.bin/myscript is a shell-script (use color)
* /bin/ls is an ELF (use readelf -a)
* ~/bin/data is data (use hexdump -C)

Moreover, Gentoo's version of lesspipe:
- has better code: use of functions which open way to go back and
  forth between file detection and various fallback methods

- use a more granular way to define its behavior (according to arguments
  values and not only arguments count) which makes it vastly superior.
  (eg: a ~/.lessfilter file could makes some custom things in order to
  detect a filetype and just then rerun lesspipe while specifying the extension)

Please note that Gentoo's lesspipe use /bin/bash (would be interesting
to know which Debian setup(s) make lesspipe /bin/sh dependant)

¹ 
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to