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

Output without paging doesn't stop highlighting #70

Closed
travankor opened this issue Dec 10, 2019 · 4 comments
Closed

Output without paging doesn't stop highlighting #70

travankor opened this issue Dec 10, 2019 · 4 comments

Comments

@travankor
Copy link

travankor commented Dec 10, 2019

Setting PAGER or BAT_PAGER to none will keep highlighting text in certain shells like bash or dash. Strangely, this does not happen on fish.

Example:
2019-12-10-04:33:35PM

Tested on delta 0.0.15.

@travankor travankor changed the title Output without paging for diff Output without paging doesn't stop highlighting Dec 10, 2019
@dandavison
Copy link
Owner

Thanks for reporting @travankor! To make sure I understand, could you clarify exactly what you mean by "setting PAGER to none"? If you could post the output of env | grep PAGER that would help too.

@travankor
Copy link
Author

Thanks for the quick response! The program bat, which seems to be where delta's pager support comes from, lets you set PAGER=none or add the flag --pager=none to turn off paging. delta doesn't seem to have the latter option, but setting the environment variable BAT_PAGER=none allows you to output to the terminal without calling a pager.

Admittedly, this sort of feature is not so useful for git diffs (I was just testing delta out in the screenshot), but this would be neat for using with diff -u, where you don't necessarily to call the pager (since diff -u does not call less by default).

@travankor
Copy link
Author

travankor commented Dec 11, 2019

On second glance, setting BAT_PAGER or PAGER=none completely messes up delta's formatting, so I'm guessing this is unsupported behaviour. Apologies for not noticing this earlier (just started looking at delta today).

Edit: So I think this is a duplicate of #45

@dandavison
Copy link
Owner

Edit: So I think this is a duplicate of #45

Right, that's what I was thinking too. But this ticket has good information in it for when someone deals with #45; thanks again.

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