Bug 17456
| Summary: | Suggested lesspipe.sh replacement | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Philip Rowlands <bugzilla> | ||||||||
| Component: | less | Assignee: | Bernhard Rosenkraenzer <bero> | ||||||||
| Status: | CLOSED RAWHIDE | QA Contact: | |||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | medium | ||||||||||
| Version: | 6.2 | CC: | chris | ||||||||
| Target Milestone: | --- | Keywords: | FutureFeature | ||||||||
| Target Release: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Enhancement | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2001-01-24 19:53:31 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: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Philip Rowlands
2000-09-12 21:39:49 UTC
Created attachment 3400 [details]
Suggested replacement for lesspipe.sh
added your new lesspipe.sh in less-358-8. Thanks Unfortunately, using this version of lesspipe.sh on a file whose name ends in .1.gz which is not a manpage doesn't work (this happens to me quite often when I try to view old logs which have been rotated and compressed by logrotate). The attached version drops back to the default .gz or .bz2 behaviour if the input file does not contain troff data. Created attachment 7628 [details]
Version of lesspipe.sh which copes with non-troff .<n>.gz files
OK, I've reopened this bug to submit a fixed version. Some additional comments: - RedHat added another case for *.?x.gz manpages. I don't think this is the right way to go, as everyone seems to invent a new section for their project. For example, on my RH6.2 install, there are *thr.gz, *t.gz, *x.gz, *m.gz, *qt.gz. man(1) is better suited to reading these sorts of manpages, as it invokes less. - RedHat added a cpio handler, which I've slightly rewritten to make it safe against files which look like options. I've never seen a cpio file with a .cpi extension. - Experimental support for directory listing (try "less /etc"). The display format is personal preference, although I appreciate that not everyone will like the -F option. - And, of course, the submitted bug. I've added an 'else' case to the manpage detection to handle compressed rotated logs. Created attachment 8169 [details]
Fixed lesspipe.sh
fixed in the current rawhide version. I didn't add the support for directories. Fair enough. I actually think Philip's directory listing support is exceptionally useful, but I guess tastes vary... |