Closed chrisgrieser closed 2 years ago
Thanks for the screenshots!
The white-on-red question marks indicate invalid UTF-8 sequences: https://github.com/walles/moar/blob/fb9f8efbe6b7554e1d7d3af7d0236b425e098e61/m/ansiTokenizer.go#L180-L184
Do you have any kind of sources for what the man page looks like?
Do you have any kind of sources for what the man page looks like? Do you mean the man page source? Not sure how to get those for the pre-installed commands like
pwd
, but since the same problem also occurs for manually installed CLIs, I tried out a few of them.
And indeed, the man page for fasd
looks especially bad. looking through the repo, it looks like the man page is created from this file: https://github.com/clvv/fasd/blob/master/fasd.1
Are you on an UTF-8 locale? What does locale
tell you?
Here's mine:
~ $ locale
LANG="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
LC_CTYPE="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_ALL=
~ $
yep, everything utf-8 here.
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
I'm unsure what to do with this on the moar
side.
Do you have any suggestions for changes to moar
that would make it better for you in this case?
I kind of like highlighting invalid UTF-8, but in this case it's just annoying.
Not sure. Maybe simply have an environment variable to turn the highlighting of invalid UTF-8 off? Then every user can decide for themselves, depending on their use case.
Thanks!
What's the env variable and the values for it I have to add to my rc file? Isn't in the readme yet
Try this:
export MOAR='--render-unprintable=whitespace'
See moar --help
for what else you can set it to.
Docs added, thanks for pointing out they were missing! https://github.com/walles/moar#configuring
Thanks for this pager – I looked ages for an alternative to less...
I noticed some weird visual bug where a red question mark is printed in moar. I tried
man pwd
The same in less:
The colorizing (less_termcap) doesn't seem to be the cause of this, turning of all coloring still creates those questions marks
Unfortunately, I cannot really pin down when the bug occurs. it seems to be related to digits, but does not affect all digits 🤔