ttscoff/mdless

How to use built-in pager?

rwmitchell opened this issue · 4 comments

newbie here - just found this, looks really nice.

I'm using iTerm2. If I unset PAGER, then mdless uses it's built in pager and images display as desired.

I'd prefer not to unset PAGER. Is there a flag or setting I can use to get the built in pager?

follow-up: can the path to imgcat be specified?

I have PAGER set to colorize_less, from an OMZ plugin. It ultimately is still using less, which is why I was confused, but must have different options set. Setting PAGER to less does work, but I'm still confused.

If I just run: imgcat foo.png | less I get the iTerm2 escape sequence for the image, not the image. What magic is mdless using?

I also just tried setting PAGER to be the full path to less ( I have V. 608 installed in addition the Apple provided 581.2 ) and wanted to make sure which I was getting. Neither work with the full path. PAGER=less does and that is using 608.

Indeed, -Xr is the magic.