walles / moar

Moar is a pager. It's designed to just do the right thing without any configuration.
Other
675 stars 19 forks source link

moar breaks hyperlink generated by delta in `git show` on Windows #244

Closed CarterLi closed 2 months ago

CarterLi commented 2 months ago

image

It works if I use less

image


It does work for git log

image

Clicking the commit hash correctly opens the github page

walles commented 2 months ago

Instead of just git show ed22dd8, can you do MOAR=--trace git show ed22dd8?

That should make moar output debug information after exit.

Please post that output here!

walles commented 2 months ago

NVM, I found it.

https://github.com/walles/moar/blob/6d3bf3dfd4989abff2f423e5b79994c1a2872e2f/m/textstyles/styledStringSplitter.go#L211-L213

Formally those hyperlinks are invalid, since \ is not allowed: https://www.rfc-editor.org/rfc/rfc3986#section-2.3

But since this works with less, I will make a change to allow them in moar.

walles commented 2 months ago

Just released v1.27.1, where these URLs should now be accepted by moar:

https://github.com/walles/moar/releases/tag/v1.27.1

walles commented 2 months ago

Out of curiosity, do you usually click the links generated by Delta?

I like that they are there, but do you ever actually click them @CarterLi?

CarterLi commented 2 months ago

Sure