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)
Mar 5 2024, 10:37 PM
Unknown Object (File)
Feb 11 2024, 3:01 AM
Unknown Object (File)
Feb 10 2024, 5:14 PM
Unknown Object (File)
Jan 28 2024, 3:54 PM
Unknown Object (File)
Jan 22 2024, 2:45 AM
Unknown Object (File)
Dec 23 2023, 12:39 AM
Unknown Object (File)
Dec 7 2023, 5:18 AM
Unknown Object (File)
Nov 18 2023, 6:17 PM
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