glow icon indicating copy to clipboard operation
glow copied to clipboard

Windows: Doesn't handle $PAGER path with a space

Open MiMiMeowMeow opened this issue 2 years ago • 2 comments

I've installed git for windows and they have less installed here:

C:\Program Files\Git\usr\bin\less.exe

If I add this to the $PAGER eviromental variable, i get the following if I try to use it: Error: exec: "C:\Program": file does not exist

Tried to add set a double quote to the string but that didn't seem to help.

glow version 1.4.1 (4863f57)

MiMiMeowMeow avatar Sep 24 '22 03:09 MiMiMeowMeow

@bashbunni I see the error is because of this line: https://github.com/charmbracelet/glow/blob/master/main.go#L305 We're splitting on the space, and trying to exec "C:\Program". Working on the PR.

Shreya-7 avatar Oct 09 '22 10:10 Shreya-7

@MiMiMeowMeow facing the same issue :(. Can't enjoy the setup on windows.

@bashbunni I can see @Shreya-7 has an PR for fix. Looks like it would do the job. Can you please look into merging this? My setup is stuck!

Thanks for this fantastic product!

abhiandthetruth avatar Oct 23 '22 17:10 abhiandthetruth