From b4305c90a3be7e1a40b76545b8b761fdbda5c309 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 4 Feb 2026 11:56:37 -0500 Subject: [PATCH] lesspipe: Allow zstd to operate on a symlink By default zstd refuses to operate on symlinks, so for example `zless /var/crash/vmcore.last.zst` failed to view the uncompressed core file. Add -f to the zstd command line to allow operation on symlinks. Reviewed by: delphij Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55101 --- usr.bin/less/lesspipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/less/lesspipe.sh b/usr.bin/less/lesspipe.sh index 253914b8b3e..6fc6cc47163 100644 --- a/usr.bin/less/lesspipe.sh +++ b/usr.bin/less/lesspipe.sh @@ -21,7 +21,7 @@ case "$1" in exec lzma -d -c "$1" 2>/dev/null ;; *.zst) - exec zstd -d -q -c "$1" 2>/dev/null + exec zstd -d -q -c -f "$1" 2>/dev/null ;; *) exec cat "$1" 2>/dev/null ;;