screen-users
[Top][All Lists]
Advanced

[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 11:39:04 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

On Sat, Mar 14, 2009 at 09:08:54AM EDT, Christian Ebert wrote:
> * Chris Jones on Saturday, March 14, 2009 at 05:21:46 -0400
> > On second thoughts .. the above doesn't make sense..
> > 
> > :-(
> 
> ;-)

Yeah .. wait till you're fully awake (or sober) till you post.
> 
> If I don't hear any more I might go for something like:
> 
> 
> if echo $TERM | grep -E -e "-[0-9]+color$" > /dev/null 2>&1
> then
>     screen -T "screen-${TERM##*-}"
> else
>     screen
> fi

screen -T is a new one on me.. I didn't find it in the man page that's
installed in my system (under "COMMAND-LINE OPTIONS") and had to grep
for it .. among other things, it can come in handy when you're testing
changes to a terminfo entry.

> I'd like to avoid a wrapper workaround.

Last resort, IMHO.. But after a couple of hours reading the manual, I
can't seem to find any simple way you could ask screen to execute
commands conditionally.

Maybe have the children bash shells conditionally reset the TERM
variable via some function or other invoked by your .bashrc?

CJ




reply via email to

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