lesspipe.sh doesn't currently handle *.tbz, a small enhancement... oh, and maybe *.arj -> unarj and *.lzh,*.lha -> lha (but possibly using the following suggested enhancement). But a bigger enhancement would be to implement pluggable handlers into lesspipe.sh, say if I install unrar, I'd like less to read *.rar archives. It'd be nice if there was let's say /etc/lesspipe.d/ for small shell scripts that one could just drop new handlers into. The following patch works for me, but may need some refining. Following the patch is a source for /etc/lesspipe.d/rar that adds the *.rar -> unrar functionality. Please consider implementing this! --- lesspipe.sh~ 2002-06-23 22:50:27.000000000 +0300 +++ lesspipe.sh 2003-01-13 01:24:25.000000000 +0200 @@ -22,13 +22,16 @@ fi ;; *.tar) tar tvvf "$1" ;; *.tgz|*.tar.gz|*.tar.[zZ]) tar tzvvf "$1" ;; - *.tar.bz2|*.tbz2) bzip2 -dc "$1" | tar tvvf - ;; + *.tar.bz2|*.tbz2|*.tbz) bzip2 -dc "$1" | tar tvvf - ;; *.[zZ]|*.gz) gzip -dc -- "$1" ;; *.bz2) bzip2 -dc -- "$1" ;; *.zip) zipinfo -- "$1" ;; *.rpm) rpm -qpivl --changelog -- "$1" ;; *.cpi|*.cpio) cpio -itv < "$1" ;; esac + for script in /etc/lesspipe.d/*; do + sh "$script" "$1" + done } ----- source for /etc/lesspipe.d/rar ----- #!/bin/sh - case "$1" in *.rar) unrar l -p- "$1" ;; esac
Looks like I can't get some spare time to really implement, and more important and time consuming, test this. Since the other packages you've mentioned would need a similar fix to write the scripts in /etc/lesspipe.d and I have even less time to do that, I'll opt for DEFERRED and maybe I can pick it up again later.