git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: pager: consider revisiting automatic LESS=FRX with custom core.pager

From
FBFrancisco Boni <boboniboni@gmail.com>
Date
Sep 19, 2026, 16:52 UTC
Message-ID
<CAKNeS+nxL6HncxKN8WTasB=CfEf85Vi0yCABrB=OGojVwAwBtA@mail.gmail.com>
In-Reply-To
<aq6utXAQA-rRoKSm@fruit.crustytoothpaste.net>

On Sat, Sep 19, 2026 at 12:48 PM brian m. carlson <sandals@crustytoothpaste.net> wrote:

Show 38 quoted lines
>
> On 2026-09-19 at 12:19:40, Francisco Boni wrote:
> > Hi,
>
> Ney,
>
> > There is also an unintuitive distinction between:
> >
> > ```
> > unset LESS
> > ```
> >
> > and:
> >
> > ```
> > LESS=""
> > ```
> >
> > The former causes Git to inject `FRX`, while the latter causes Git to
> > leave the pager environment alone.
>
> Yes, that's because Git sets the environment iff it is unset.  In the
> latter case, it is not unset: it is set to a zero-length value.
>
> > I realize simply removing the default could have substantial
> > compatibility consequences given how longstanding this behavior is.
> > But perhaps it would be worth considering whether the automatic `LESS`
> > default should:
> >
> > * apply only to Git's own default pager path
> > * be suppressible explicitly through configuration; or
> > * otherwise avoid affecting arbitrary custom `core.pager` commands.
>
> We can't know in the general case whether the pager is less or not.  On
> FreeBSD, `more` is less, for instance, and the pager command allows
> arbitrary shell commands, so determining statically which branch is
> taken is not always possible.  Notably, Debian has `sensible-pager`,
> which is the default on that OS, and may (or may not) be less.
Hi Brian,

Thanks for the detailed explanation. The FreeBSD "more" case and the arbitrary-shell-command nature of core.pager clarified some assumptions I was making about how feasible it would be for Git to distinguish "direct less" from wrappers or dynamic pager selection...

That makes the compatibility argument much clearer. The suggested LESS="" delta override is useful to know about.

Also, thank you for your work on Git.

Best, Francisco Boni

Previous: Junio C Hamano
Message 7 of 7 in “pager: consider revisiting automatic LESS=FRX with custom core.pager”
  1. Francisco BoniSep 19, 2026
  2. brian m. carlsonSep 19, 2026
  3. Todd ZullingerSep 19, 2026
  4. doc: add more examples of overriding LESS in core.pagerTodd Zullinger, Oct 2, 2026
  5. brian m. carlsonOct 5, 2026
  6. Junio C HamanoOct 6, 2026
  7. Francisco BoniSep 19, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.