bug-bash
[Top][All Lists]
Advanced

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

Re: Bug in select-command


From: Chet Ramey
Subject: Re: Bug in select-command
Date: Sat, 24 Jun 2017 13:13:06 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

On 6/24/17 7:46 AM, address@hidden wrote:
> It is necessary to refresh the variable $COLUMNS in a script (COLUMNS="tput 
> cols") otherwise the command "select" will not set the number of columns 
> correctly for actual screen resolution.

So you are saying that the value of COLUMNS passed in the environment is
not correct? Or that it's not present?

When the shell isn't interactive, it relies on the value passed in the
environment.  It's not the shell's role to second-guess the environment
value and change it regardless of whather or not it's "correct".

If the value doesn't appear in the environment, it's the programmer's
responsibility to make sure that the correct value is set.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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