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

Force usage of pager for diff, show, etc when piping to non-TTY

From
PPatrick <patrickf3139@gmail.com>
Date
Aug 16, 2023, 00:09 UTC
Message-ID
<CAMRL+qYYGJ-LYG8qZpJOq+_=YO_C7JSTH4TPDpbEA4fRdANP7w@mail.gmail.com>
Hi,

I noticed there is no option I can pass to git to use the pager set in my gitconfig even when piping to non-TTY. Is there a workaround? If not, may I request this as a new feature?

Use case: integrate tools like Delta or diff-so-fancy when building wrappers around git commands. See https://github.com/dandavison/delta/discussions/840 and https://github.com/PatrickF1/fzf.fish/discussions/202 for examples.

Thanks, Patrick

Next: Jeff King
Message 1 of 7 in “Force usage of pager for diff, show, etc when piping to non-TTY”
  1. PatrickAug 16, 2023
  2. Jeff KingAug 16, 2023
  3. PatrickAug 16, 2023
  4. Jeff KingAug 17, 2023
  5. PatrickAug 17, 2023
  6. Jeff KingAug 17, 2023
  7. PatrickAug 17, 2023

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.