* [Sat, Dec 31, 2022 at 01:29:24PM +0000] Ganesh Sittampalam:
>I had a quick Google for whether `PAGER` is already specified anywhere
>and found https://unix.stackexchange.com/a/213369/1057
>
>"If the PAGER variable is null or not set, the command shall be either
>more or another paginator utility documented in the system
>documentation."
The same wording is used in POSIX/SUS:
http://pubs.opengroup.org/onlinepubs/9699919799
>However actually experimenting with man on Ubuntu, I get this
>behaviour:
[...]
> - PAGER is set to the empty string (is that the same as null?):
> doesn't use a pager
There appears to be some variance here. On FreeBSD
$ MANPAGER= PAGER= man 1 man
still invokes `less -s` (as documented in its own manpage). Actually,
given that GNU man (as shipped on Debian) contradicts SUSv4 (and its own
documentation), I would consider that to be a bug. Anyway, even without
discussing about the descriptive/prescriptive dualism of POSIX/SUS, my
2c opinion is that that behaviour only applies to the man utility and
other programs are not required to act the same.
>Maybe it should have a test?
As it turned out, the test framework capturing the output means that
isTerminal is always False in tests, so any pager-related test is
fundamentally useless.
|