delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/11/14:39:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.1.0.14.2.20020211112643.024f5a10@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
X-Mailer: QUALCOMM Windows Eudora Version 5.1
X-Priority: 1 (Highest)
Date: Mon, 11 Feb 2002 11:39:15 -0800
To: "Stephano Mariani" <sk DOT mail AT btinternet DOT com>,
"'Scott Prive'" <Scott DOT Prive AT storigen DOT com>
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: RE: "LINES" environment variable
Cc: <cygwin AT cygwin DOT com>
In-Reply-To: <025101c1b330$72e3fa30$01000001@sknet01>
References: <88D2015B3AF7BF4B91272EC25A9FE097012B1885 AT XCHANGESERVER DOT storigen DOT com>
Mime-Version: 1.0

Stephano,

The result of these commands ...


         % strings /bin/bash.exe |egrep LINES

and

         % strings /bin/bash.exe |less
         [ type "/LINES<RETURN>" to search for "LINES" ]


... show three occurrences of LINES built into BASH and "less" lets you see 
that each of these occurs in conjunction with the string COLUMNS.

So, my guess is that BASH is injecting these into the variable mix (but not 
as exported environment variables) based on what the tty driver reports as 
the terminal window dimensions. From what you say, the fact that LINES is 
already set in the environment when the shell is invoked does not deter 
BASH from (re-) setting those variables.

This setting / altering of LINES does not appear to happen when BASH is 
invoked as /bin/sh.exe, so that suggests one work-around. Otherwise, just 
set the variable manually in whatever script you're running or supply the 
value as an argument, possibly via an -option. You could always just choose 
a different name, too...

Randall Schulz
Mountain View, CA USA



At 11:15 2002-02-11, Stephano Mariani wrote:
>I have tried everything, but some hard-coded value must exist. The only 
>way it seems to work is when I explicitly execute an export. I can do this 
>using bash easily, but what about ash (/bin/sh) or any other cygwin 
>program (perhaps ones started outside of bash).
>
>TIA
>Stephano Mariani
>
>-----Original Message-----
>From: Scott Prive [mailto:Scott DOT Prive AT storigen DOT com]
>Sent: Monday, 11 February 2002 2 54
>To: Stephano Mariani
>Subject: RE: "LINES" environment variable
>
>I'm curious as to why Cygwin isn't pickup your NT environment variable, 
>but you can export this variable from your ~/.bash_profile (if you don't 
>mind it being picked up for everything you might run from the shell).
>
>
>-----Original Message-----
>From: Stephano Mariani [mailto:sk DOT mail AT btinternet DOT com]
>Sent: Thursday, February 07, 2002 6:39 PM
>To: cygwin AT cygwin DOT com
>Subject: "LINES" environment variable
>Importance: High
>
>Where can I override the LINES environment variable? I need to run some 
>programs that use this value to determine the display characteristics.
>
>I have set it to 50 in the system environment in windows, but echo $LINES 
>says 25.
>
>Stephano Mariani


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019