[Top][All Lists]

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

Re: Getting screen size into the env?

From: Aaron Davies
Subject: Re: Getting screen size into the env?
Date: Thu, 7 Aug 2008 14:43:22 +0800

On Thu, Aug 7, 2008 at 2:14 PM, Micah Cowan <address@hidden> wrote:
> Aaron Davies wrote:
>> How do I get the screen size env vars set properly? Screen appears to
>> be populating TERMCAP for me (correctly), as it's not defined when
>> outside of screen, but does exist inside.
> There's nothing that ever sets env vars to the screen size.
> However, if you use bash, it will set _shell_ variables, COLUMNS and
> LINES, automatically. This isn't something that screen does, but bash.
> Bash does _not_ export these by default, however; you'll need to do
>  $ export COLUMNS LINES
> to get them into the environment. Of course, if you're not running bash,
> you may not have them at all; in which case you may need to parse them
> out of the screen-supplied TERMCAP (which, unlike the bash vars, can't
> be kept up-to-date when the window size changes).

Hmm, OK. I am running bash, at least according to /etc/passwd, though
$SHELL seems to be "sh". In any case, zsh seems to do it correctly on
my setup, and I prefer zsh anyway.
Aaron Davies

reply via email to

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