glow icon indicating copy to clipboard operation
glow copied to clipboard

No PAGER on Windows

Open QuAzI opened this issue 5 months ago • 10 comments

-p parameter doesn't work on Windows by default, more should be used for Windows

> glow -p doc.md
Error: exec: "less": executable file not found in %PATH%

but if I use pipes glow doc.md | more with non-ANSI files, something wrong with the encoding

> glow doc.md | more

╨Ю╨▒╤Й╨╕╨╡ ╨╖╨╜╨░╨╜╨╕╤П Computer Science: ╨░╨╗╨│╨╛╤А╨╕╤В╨╝╤Л ╨╕ ╨╕╤Е ╤Б╨╗╨╛╨╢╨╜╨╛╤Б╤В╤М, ╨╛╨┐╤В╨╕╨╝╨╕╨╖╨░╤Ж╨╕╤П,
╨░╤А╤Е╨╕╤В╨╡╨║╤В╤Г╤А╨░ ╨║╨╛╨╝╨┐╤М╤О╤В╨╡╤А╨░ (╨┐╤А╨╛╤Ж╨╡╤Б╤Б╨╛╤А, ╨┐╨░╨╝╤П╤В╤М, ╨║╤Н╤И, ╨▓╨▓╨╛╨┤/╨▓╤Л╨▓╨╛╨┤), ╨▒╨╕╤В╨╛╨▓╤Л╨╡
╨╛╨┐╨╡╤А╨░╤Ж╨╕╨╕, ╨┐╤А╨╛╤Ж╨╡╤Б╤Б ╤Б╨▒╨╛╤А╨║╨╕ ╨┐╤А╨╕╨╗╨╛╨╢╨╡╨╜╨╕╤П

while just glow doc.md has no issue with encoding and cat doc.md too... something goes wrong in pipes?

Setup Please complete the following information along with version numbers, if applicable.

  • OS: Windows 10 Pro 22H2
  • Shell: PowerShell
  • Terminal Emulator: wt
  • Locale: ru_RU.UTF-8

QuAzI avatar Jun 30 '25 11:06 QuAzI

Can you try using Windows Terminal?

Delta456 avatar Jun 30 '25 16:06 Delta456

Terminal Emulator: wt

QuAzI avatar Jun 30 '25 16:06 QuAzI

Can you attach a screenshot and doc.md?

Delta456 avatar Jun 30 '25 16:06 Delta456

test.md

Image

A bit more details

> Get-WinSystemLocale

LCID             Name             DisplayName
----             ----             -----------
1049             ru-RU            Russian (Russia)

QuAzI avatar Jun 30 '25 16:06 QuAzI

Sounds like more not able to handle unicode

Delta456 avatar Jun 30 '25 16:06 Delta456

Damn. I'm just tried and you are absolutely right. I didn't expect that such a standard utility couldn't do something so obvious. So, no PAGER at all for Windows)

QuAzI avatar Jun 30 '25 17:06 QuAzI

Try https://github.com/walles/moar

Delta456 avatar Jun 30 '25 17:06 Delta456

Thanks a lot

QuAzI avatar Jun 30 '25 17:06 QuAzI

Do let us know if this is working for you and this issue can be closed then

Delta456 avatar Jun 30 '25 17:06 Delta456

Also, try changing your locale to English. Maybe that can help

Delta456 avatar Jun 30 '25 17:06 Delta456