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

Update preview-tui #1178

Closed
wants to merge 1 commit into from
Closed

Update preview-tui #1178

wants to merge 1 commit into from

Conversation

tax79
Copy link

@tax79 tax79 commented Sep 24, 2021

Removed the color option from bat due to a bug while displaying any text files.

Removed the color option from bat due to a bug while displaying any text files.
@luukvbaal
Copy link
Collaborator

What "bug" are you talking about? It's best to elaborate if you make a PR.
The bug is more likely to be in your environment than in preview-tui.

If you can't be bothered to fix your environment, feel free to make these changes locally, no need to make a PR...

@luukvbaal luukvbaal closed this Sep 24, 2021
@tax79
Copy link
Author

tax79 commented Sep 24, 2021

Try it yourself. lol
Now the preview looks like this:
https://imgur.com/a/BfUvq2S
If you change
--color=always
to
--color=auto
the problem is solved.

@luukvbaal
Copy link
Collaborator

luukvbaal commented Sep 25, 2021

Like I said, the preview looks like that due to problems with your local environment.
sharkdp/bat#1113 sharkdp/bat#1063 seem related but those are supposed to have been fixed so I'm not sure.

In any case I use preview-tui every day and the problem is not present for me, I don't need to "try it myself", lol.

@tax79
Copy link
Author

tax79 commented Sep 25, 2021

Changing 'most' with 'less' in this line solves the issue:
[ "$PAGER" = "most" ] && PAGER="less -R"
Now everything works as supposed to.
Thanks.

@luukvbaal
Copy link
Collaborator

The fact that this is necessary for you must mean you have PAGER set in your environment without the -R flag. Adding that should be enough, see PAGER="${PAGER:-less -P?n -R}" in preview-tui.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants