urlscan icon indicating copy to clipboard operation
urlscan copied to clipboard

neomutt curses term database not found error - fix

Open tjex opened this issue 2 years ago • 1 comments

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.

tjex avatar Aug 16 '23 07:08 tjex

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

firecat53 avatar Dec 08 '23 04:12 firecat53

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

firecat53 avatar Mar 27 '24 03:03 firecat53

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

tjex avatar Mar 27 '24 05:03 tjex