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

Help with lesspipe: no colorizing #83

Closed
mathomp4 opened this issue Mar 14, 2022 · 2 comments
Closed

Help with lesspipe: no colorizing #83

mathomp4 opened this issue Mar 14, 2022 · 2 comments

Comments

@mathomp4
Copy link

I apparently am an idiot as I can't figure out what I'm doing wrong.

So, I want to use bat to colorize with lesspipe. So, in my environment I have set:

env | grep LESS
LESS=-fRimWFX
LESSOPEN=|/usr/local/bin/lesspipe.sh %s
LESS_ADVANCED_PREPROCESSOR=1
LESSCOLORIZER=bat --style=plain

I like the bat plain style, and my lesspipe is v2.04 from brew.

As far as I know, this is all good...but when I call less, it's not using bat at all. Just...something not colorful. I see something from lesspipe it looks like with the "append" message:

less CHANGELOG.md
==> append : to filename to view the markdown file
Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to
Semantic Versioning.
...

The weird thing is, I think I have pretty much the same settings on another laptop and it works. (Well, on that one I'm experimenting with using pygmentize, but still, I get color!).

Any ideas of my mistake?

@mathomp4 mathomp4 changed the title Help with lesspipe Help with lesspipe: no colorizing Mar 14, 2022
@wofr06
Copy link
Owner

wofr06 commented Mar 18, 2022

The handling of the -l option for bat was slightly improved like in #77. The option for bat in the ENV variable LESSCOLORIZER is ignored. bat can be configured using ~/.config/bat/config.
LESS_ADVANCED_PREPROCESSOR is not used anymore.
Nevertheless I could not reproduce your problem, for me the files do show colors also with bat.

@mathomp4
Copy link
Author

Okay. I decided to do a big ol' clean of my setup and I think I got it working! Thanks!

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