[TUHS] Origins and life of the pg pager

Bakul Shah bakul at iitbombay.org
Tue Jun 23 07:59:48 AEST 2020


$ PAGER="col -b" git log
33mcommit fe147581ff1c5b0571a40369cd257fe60bfee58cm33m (m1;36mHEAD -> m1;32mmasterm33m, m1;31morigin/masterm33m)m
...

$ git log | cat
commit fe147581ff1c5b0571a40369cd257fe60bfee58c

There is probably a way to turn off syntax coloring but I haven't bothered to learn.

$ man git-log | wc
    2512   14056  127024

> On Jun 22, 2020, at 2:33 PM, Rob Pike <robpike at gmail.com> wrote:
> 
> There is only one correct way.
> 
> % grep PAGER .bashrc
> export PAGER='col -b'
> % 
> 
> -rob
> 
> 
> On Tue, Jun 23, 2020 at 2:26 AM Derek Fawcus <dfawcus+lists-tuhs at employees.org <mailto:dfawcus%2Blists-tuhs at employees.org>> wrote:
> On Sun, Jun 21, 2020 at 05:35:28PM -0700, Greg A. Woods wrote:
> > 
> > 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.
> 
> Well, for further fun, one could always export GIT_PAGER=cat,
> then git will not use a pager for those commands, recognising that
> 'cat' is a no-op in such cases.  :-)
> 
> DF

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20200622/ddbe8b82/attachment.htm>


More information about the TUHS mailing list