[TUHS] Fwd: Origins and life of the pg pager

Greg A. Woods woods at robohack.ca
Mon Jun 22 10:35:28 AEST 2020


At Sun, 21 Jun 2020 20:49:31 +0200, Michael Siegel <msi at malbolge.net> wrote:
Subject: Re: [TUHS] Fwd: Origins and life of the pg pager
>
> In fact, my question about the origin and life of pg(1) arose while
> writing a yet unfinished addendum to a blog article that details my
> failed attempt to hack together a solution for auto-paged ls(1).[1]
>
> The conclusion there was: Those attempts (you can find them in quite a
> few places throughout the Web) are futile, just pipe to a pager when you
> need it.

Indeed!  Just pipe to a pager when you need to!

There's also the benefit use of a modern "terminal" gives, e.g. Xterm:

(a) on a modern screen it can display a whole lot more than an
    old-fashioned 24x80 terminal;

(b) it offers a scroll-back buffer so if you get somewhat more output
    than expected you can just scroll back a bit to scan through it all.

Such features further reduce the need for any pager.

In a related vein what annoys me are so-called modern programs like
"git", "hg", and others which default to always piping their output
through $PAGER, along with such things as colour decorations enabled,
but when you tack on "|$PAGER" to their command-line then they turn off
the decorations!  They cause me to have to undo decades of finger
memory.

> However, there's no need to write out "less" every time. You can just
> alias that to "pg" without causing any harm and save two letters, which
> is an improvement for a task that is performed manually rather often.

I've used an alias and/or shell function called "ds" (for display) since
approximately forever, typically to invoke whatever I've set $PAGER to,
at least in more recent times.

Others I've know have called it just "p", and indeed there's been a
pager called just "p" in Research Unix since the Eighth Edition (and in
8th Edition the manual page suggests is also known as "more" and by 10th
Edition the manual adds "pg" too, though it's not installed directly
with those aliases by the makefile).

I've stuck with "ds", partly for finger memory, and also partly because
it is for the most part unique (at least in all environments I've
typically used).  That gives me the option of using a pager called "pg"
directly should I want to, while getting my "default" favourite pager
(from those available on a given system) when I use "ds".

--
					Greg A. Woods <gwoods at acm.org>

Kelowna, BC     +1 250 762-7675           RoboHack <woods at robohack.ca>
Planix, Inc. <woods at planix.com>     Avoncote Farms <woods at avoncote.ca>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP Digital Signature
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20200621/992d2267/attachment.sig>


More information about the TUHS mailing list