Page MenuHomeFreeBSD

zless(1): handle uncompressed files
ClosedPublic

Authored by fernape on Feb 19 2023, 5:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 4:19 PM
Unknown Object (File)
Mon, Oct 28, 3:04 PM
Unknown Object (File)
Oct 18 2024, 4:05 AM
Unknown Object (File)
Oct 9 2024, 1:21 AM
Unknown Object (File)
Oct 7 2024, 4:56 PM
Unknown Object (File)
Oct 2 2024, 3:30 AM
Unknown Object (File)
Sep 24 2024, 2:47 AM
Unknown Object (File)
Sep 21 2024, 5:19 AM
Subscribers

Details

Summary

In the manual page for zmore(1) and zless(1) it is said that zless(1) is
equivalent to zmore(1) except that it uses less(1) as a pager. However
zmore(1) is able to handle uncompressed files transparently while zless(1)
is not.

Add another case to the switch in lesspipe.sh to handle non-compressed files.

PR: 196437
Reported by: marquis@roble.com

Test Plan

Before the patch:

$ echo "Hello world!" > test
$ gzip test
$ zmore test.gz
Hello world!
$ zless test.gz
<shows file>
$ zmore test
Hello world!
$ zless test








test (END)

After the patch, zless test shows the file normally. This also is in sync with
the manual page.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable