[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can 256color be recognized automatically?

From: Chris Jones
Subject: Re: can 256color be recognized automatically?
Date: Sat, 14 Mar 2009 04:50:09 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

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
> (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
    TERM=screen /usr/local/bin/screen
    TERM=screen-256color /usr/local/bin/screen

Totally untested, only to clarify the above.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]