-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bat as manpager #3053
Comments
well mostly fine it seems to add [0m22m or [0m24m in front of left bracket (, but other than that formatting and colors are preserved |
Check out this comment and the whole issue, that might solve your issue. |
Additional context for why this is happening: #2568 (comment) In summary, newer versions of export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'" |
That MANROFFOPT='-c' thing doesn't work for me, but eth-p's suggestion works perfectly, thanks :) |
@eth-p worked for me too. FWIW, I'm on an RHEL8 system with my own terminfo created specifically for MS Terminal (undercurl support, etc). |
This is on Linux Mint Willma, with bat installed through homebrew.
When I use the: MANPAGER="sh -c 'col -b | bat -p -l man'" option as described in readme i get weird color codes like: 1mSYNOPSIS0m, but when I simply use MANPAGER="bat -p -l man" everything works fine.
The text was updated successfully, but these errors were encountered: