sharkdp / bat

A cat(1) clone with wings.
Apache License 2.0
49.28k stars 1.25k forks source link

macOS man pager issues #645

Closed zackhsi closed 4 years ago

zackhsi commented 5 years ago

Hello, I've configured MANPAGER according to the README, but do not see the expected results.

image

Separately, the man pages from coreutils (installed via brew, configured via export MANPATH=/usr/local/opt/coreutils/libexec/gnuman:$MANPATH) are incompatible with the bat as MANPAGER.

man 2 select is not available in coreutils, so I've used man dirname in the following screenshot:

image

Thanks for the project!

sharkdp commented 5 years ago

The result in screenshots do not look too bad, IMO. It could be just the bat syntax highlighting theme which does not support all of the colorizations I've chosen (which could certainly be improved). Which theme are you using? Could you try to select a different one?

sharkdp commented 4 years ago

@zackhsi any update on this? I'm going to close it, but happy to reopen if it is not resolved.

sharkdp commented 4 years ago

a few improvements were made to the man-pager README section, so it might be worth to have a second look.

zackhsi commented 4 years ago

@sharkdp thanks for the README updates.

I believe my trouble is supporting both the macOS and coreutils syntaxes (brew install coreutils). While I'm able to get the ~same highlighting for the macOS manpages, the bat-based highlighting for coreutils pages is not quite as good as other solutions.

Thanks for the excellent tool -- I use it extensively :)

sharkdp commented 4 years ago

If you think there is anything specific that we could fix, please let us know. Have you tried to set MANROFFOPT="-c"?

zackhsi commented 4 years ago

Yep, I've set MANROFFOPT.

Here's what the macOS man page for select looks like. The code bits look OK, but I expect the section headers to stand out, and for things like FD_ISSET to be colored consistently.

image

sharkdp commented 4 years ago

The code bits look OK, but I expect the section headers to stand out

I think this is a problem with the "TwoDark" theme. Could you please try a different theme (e.g. "Monokai Extended" or "Dracula").

and for things like FD_ISSET to be colored consistently.

I think that's an actual problem with the highlighting. It would be great if you could open a new ticket for this.

sharkdp commented 4 years ago

and for things like FD_ISSET to be colored consistently.

I think that's an actual problem with the highlighting. It would be great if you could open a new ticket for this.

Should be fixed with #718