firecat53 / urlscan

Mutt and terminal url selector (similar to urlview)
GNU General Public License v2.0
211 stars 36 forks source link

neomutt curses term database not found error - fix #135

Closed tjex closed 4 months ago

tjex commented 11 months ago

Just wanted to quickly bring to attention a fix to an issue I've just encountered. I'm on a mac, but still generally applicable as it has to do with xterm definitions / profiles.

Truecolor (256 colors) became supported as of the latest neomutt release. However to enable this, we currently need to execute TERM=xterm-direct neomutt to use the colors properly. see here.

I found that when running urlscan, I was getting an error setupterm: could not find terminfo database. And this was because there is no term definition for xterm-direct. I'm not actually sure how the xterm-direct even works with loading 256 colors... With TERM=xterm-256color, neomutt does not load the colors properly. Very confusing, and there are not other suggestions from the devs as to other ways to execute / run colors properly - hence the following fix.

I couldn't find a definition for xterm-direct to download (?), so I did a quick and dirty addition to the suggested macro command from the wiki:

macro index,pager \cb "<pipe-message> urlscan<Enter>" "call urlscan to extract URLs out of a message"

becomes

macro index,pager \cb "<pipe-message> TERM=xterm-256color urlscan<Enter>" "call urlscan to extract URLs out of a message"

urlscan runs then as expected

if it's worth it, I can make a pr and add this to the readme.

firecat53 commented 7 months ago

Sure, sounds like a reasonable documentation update. Thanks! And sorry for the very slow response...

firecat53 commented 4 months ago

Are you still planning on submitting a documentation update or is this no longer an issue? Thanks!

tjex commented 4 months ago

Hey, sorry my mistake for not linking the issue in the pr, but it's already done :) - pr #136