Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Feb 2023 11:16:43 GMT
From:      =?utf-8?Q?Fernando=20Apestegu=C3=ADa?= <fernape@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e6ffcf4ac7bb - main - zless(1): handle uncompressed files
Message-ID:  <202302201116.31KBGhU4020050@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/src/commit/?id=e6ffcf4ac7bbfff95fdf7d6debc22880054abc76

commit e6ffcf4ac7bbfff95fdf7d6debc22880054abc76
Author:     Fernando ApesteguĂ­a <fernape@FreeBSD.org>
AuthorDate: 2023-02-19 16:31:11 +0000
Commit:     Fernando ApesteguĂ­a <fernape@FreeBSD.org>
CommitDate: 2023-02-20 10:15:09 +0000

    zless(1): handle uncompressed files
    
    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
    Approved by:    mjg@
    Differential Revision: https://reviews.freebsd.org/D38674
---
 usr.bin/less/lesspipe.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/usr.bin/less/lesspipe.sh b/usr.bin/less/lesspipe.sh
index 05df4d02b42c..079517679a6d 100644
--- a/usr.bin/less/lesspipe.sh
+++ b/usr.bin/less/lesspipe.sh
@@ -25,4 +25,6 @@ case "$1" in
 	*.zst)
 		exec zstd -d -q -c "$1"	2>/dev/null
 		;;
+	*)	exec cat "$1"		2>/dev/null
+		;;
 esac



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302201116.31KBGhU4020050>