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

Re: [BUG] git help -a should no use page when in pipe

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 11, 2018, 08:52 UTC
Message-ID
<xmqqwoogjvil.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CALmyJ=OaZAgr1i1DXMRQqCVWnKvO=QZH6AeGj8YfKMxAnRz6GA@mail.gmail.com>
许铖 <thexuc@gmail.com> writes:
> Since git 2.20.0, invoking `git help -a` will cause git using page (e.g. less)
> to display help message.
> ...
> I would suggest `git help -a` only invokes page when stdout is a tty.

It already does so for me. "GIT_PAGER=uc git help -a | cat" where "uc" is a custom "pager" that is "tr '[a-z]' '[A-Z]'" does not show things in ucase, but without piping to cat, the output is in ucase as expected. Perhaps there is something different between what we are doing.

FWIW, I am not on Windows or on a Mac.
Previous: 许铖
Message 2 of 2 in “[BUG] git help -a should no use page when in pipe”
  1. 许铖Dec 11, 2018
  2. Junio C HamanoDec 11, 2018

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.