On Thu, Mar 12, 2009 at 06:57:38PM EDT, Christian Ebert wrote:
> Hi,
>
> $ screen -v
> Screen version 4.01.00devel (FAUd87a0d8) 2-May-06
>
> that's latest from git repo, and latest ncurses(w) + xterm.
>
> At the moment I have to set explicitly
>
> term "screen-256color"
> to get 256 colors working. Otherwise $TERM stays simply "screen",
> even when called from an xterm-256color environment.
> Sometimes, albeit rarely I switch to Apple's Terminal.app
> (nsterm-16color), and I'd like to get screen-16color there
> without having to set it explicitly.
>
> Is this possible? What am I doing wrong?
Maybe you could use a wrapper that tests the underlying terminal's color
capability & sets the $TERM environment variable?
ncl=$(tput colors)
case "$ncl" in
'16')
TERM=screen /usr/local/bin/screen
;;
'256')
TERM=screen-256color /usr/local/bin/screen
;;
esac
Totally untested, only to clarify the above.
CJ
_______________________________________________
screen-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/screen-users