Skip to content

docs: Include cat in custom pagers examples#5328

Closed
NathanielRN wants to merge 1 commit into
jesseduffield:masterfrom
NathanielRN:enowell-add-cat-as-a-pager-in-custom-pager-examples
Closed

docs: Include cat in custom pagers examples#5328
NathanielRN wants to merge 1 commit into
jesseduffield:masterfrom
NathanielRN:enowell-add-cat-as-a-pager-in-custom-pager-examples

Conversation

@NathanielRN
Copy link
Copy Markdown

@NathanielRN NathanielRN commented Feb 27, 2026

cat is the default git pager, and although not as sophisticated, it redraws faster than other pagers who suffer from the bug in #5327. Adding it to the docs will help new devs know that this is an option.

PR Description

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

cat is the default git pager, and although not as sophisticated, it
redraws faster than other pagers who suffer from the bug in jesseduffield#5327.
Adding it to the docs will help new devs know that this is an option.
@stefanhaller
Copy link
Copy Markdown
Collaborator

It doesn't make much sense to use cat as a pager; better to use no pager at all, that's more efficient. Use - pager: "" for that.

I don't really think we need to document this though.

@NathanielRN
Copy link
Copy Markdown
Author

Thanks, I didn’t know “nothing” was an option. I thought using cat was helpful because it doesn’t have the render issues of #5327. I’ll close this then and if others feel the same later feel free to mention that empty strong option.

@fpuga
Copy link
Copy Markdown

fpuga commented May 28, 2026

I search the issues looking exactly for how to configure the default pager as an option: - pager: ""

I think it will be a great addition to the docs. I can provide a PR if you are interested.

Adding here a single line will be fine for me.

git:
  pagers:
    - pager: "" # default no pager
    - pager: delta --dark --paging=never
    - pager: ydiff -p cat -s --wrap --width={{columnWidth}}
      colorArg: never
    - externalDiffCommand: difft --color=always

@NathanielRN NathanielRN deleted the enowell-add-cat-as-a-pager-in-custom-pager-examples branch May 28, 2026 14:54
@stefanhaller
Copy link
Copy Markdown
Collaborator

It's maybe even cleaner to add the default diff by adding an empty object to the list (i.e. {}, don't set any properties), since the default value for the pager property is the empty string.

I added this to the docs in #5656.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants