gwsw / less

Less - text pager
http://greenwoodsoftware.com/less
Other
548 stars 87 forks source link

Allow Unicode Private Use Area code points for prompt #363

Closed mutax closed 1 year ago

mutax commented 1 year ago

I am using unicode code points from the range U+E000..U+F8FF in my prompt to make use of characters in the powerline fonts. Unfortunately they are considered unassigned and thus escaped instead of sent to the terminal.

When removing the range in ubin.uni I can use these characters in my prompt -- and they are also shown when paging through a file.

It would be great if these code points could be allowed at least for the prompt.

gwsw commented 1 year ago

What version of less are you using? In the current beta release (less-632) you can use the LESSUTFCHARDEF environment variable to treat Private Use characters as printable.

mutax commented 1 year ago

I have to admit that I forgot to check the git and used the latest release tarball. Note self: don't create a feature request at 5 a.m. Awesome work! I skimmed over the other code changes and the formatting -- whow!

Unfortunately the version of less I get in Ubuntu jammy is 590 which led me down the rabbit hole. That is the Ubuntu version that gets installed with wsl2 by default currently. So after some debugging of partial ansi escape sequences displayed in the prompt I ended up here. Sorry for the noise and take it as huge thank you and appreciation of your work then :)