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
This commit is contained in:
Ed Maste
2026-02-04 11:56:37 -05:00
parent 16822dac32
commit b4305c90a3
+1 -1
View File
@@ -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
;;