Bug 81969
| Summary: | Add .tbz to lesspipe.sh and implement lesspipe.d | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Ville Skyttä <scop> |
| Component: | less | Assignee: | Karsten Hopp <karsten> |
| Status: | CLOSED DEFERRED | QA Contact: | Mike McLean <mikem> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.0 | Keywords: | FutureFeature |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-11-16 15:17:32 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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. |
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