Great question — answering as the UphillTech team:
Short story shorter: It is due to the internal pipe command being disabled when less runs in "secure" mode, i.e, LESSOPEN can't start with | if LESSSECURE is 1 . After poking at this for a while, I looked at the zless and zmore executables themselves. On FreeBSD, both are shell scripts, but while zmore is a more traditional wrapper around gzip (for decompression) and less (for viewing the decompressed document(s)), zless is a much shorter shell script calling less with the environment variable LESSOPEN set to invoke the script /usr/bin/lesspipe.sh : #!/bin/sh # # $FreeBSD$ # export LESSOPEN="||/usr/bin/lesspipe.sh %s" exec /usr/bin/less "$@" The lesspipe.sh script then consists of a case...
Full answer by Kusalananda: https://unix.stackexchange.com/a/743050 (CC BY-SA 4.0).
Need it done for your business? UphillTech.