hint to the user to set TERM=xterm-256color if 256 or more colors are not available
Seems like a lot of folks don't have 256 colors setup, let's help them get there.
Hmm ...
$ TERM=xterm-256color lnav messages
Error opening terminal: xterm-256color.
$ TERM=xterm lnav messages
(works)
Note that xterm-256color is the default value using gnome-terminal on my Fedora 29 install.
TERM=xtermis a workaround
May be it is caused by same issue as described here
https://github.com/rgburke/grv/issues/46#issuecomment-396052778
If this is the case then compiling with ncurses version 6.1 should resolve the issue.
this issue only appears when using 0.8.5 and when I use TERM=xterm the colors get really ugly
Related issue: https://github.com/tstack/lnav/issues/671
It seems recompiling lnav with a version of ncurses newer than 6.1 solves the issue.
Have tried lnav versions 0.8.3 and 0.8.5 on RHEL 8.2 (accessed remotely) With "TERM-xterm-256color" on the remote system, the application will not run at all. If I switch to "TERM-xterm", colors in the application are wrong.
i have the same issue with lnav 0.8.5 on suse (lnav_log.cc:479 Error opening terminal: xterm-256color) although TERM=xterm-256color
NAME="SLES" VERSION="15-SP1" VERSION_ID="15.1" PRETTY_NAME="SUSE Linux Enterprise Server 15 SP1" ID="sles" ID_LIKE="suse" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:suse:sles:15:sp1"
lnav 0.9.0 is starting without errors, but absolutely no colors are shown within lnav (maybe some different greys) connecting from a mac with ITerm2 and Terminal apps
any idea why? regards
on SLES 15-SP4 here, I need TERM=xterm-color for lnav to show colorized output.