Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 PAGER= does nothing #386

Closed
jyn514 opened this issue Nov 8, 2020 · 3 comments
Closed

🐛 PAGER= does nothing #386

jyn514 opened this issue Nov 8, 2020 · 3 comments

Comments

@jyn514
Copy link

jyn514 commented Nov 8, 2020

When I set GIT_PAGER=, git correctly does not send output through delta. However, if I set PAGER=, delta still sends output to a pager.

My use case is that I want to get the highlighting, etc. from delta, but without launching a pager: PAGER= GIT_PAGER=delta git diff (rust-lang/rust#78752).

@dandavison
Copy link
Owner

Hi @jyn514, quick answer: you can use --paging=never for this.

Thanks though, I didn't realize before, but I see you're right that delta's behavior isn't quite the same as git's (and bat's): as you point out, they make a distinction between the env vars being not set at all (still page by default, since less sophisticated users may well not have the env var set and will expect paging) versus set to empty string (no paging).

@jyn514
Copy link
Author

jyn514 commented Nov 8, 2020

quick answer: you can use --paging=never for this.

Thanks - yeah, that works for delta, but I don't think it works across commands (rust-lang/rust#78752 (comment)). This would be nice to have so I can switch out delta with other programs and not have to know which I'm using.

@dandavison
Copy link
Owner

Yes, makes sense. Thanks for this, fixed in master.

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

No branches or pull requests

2 participants