Web lists-archives.com

Re: ncurses problem




On 9/29/18 9:14 AM, Sven Joachim wrote:
On 2018-09-29 11:02 +0000, Grzesiek Sójka wrote:

On 9/28/18 9:44 AM, Sven Joachim wrote:

Actually it is exactly the other way around.  If LINES and COLUMNS are
set in the environment, then the ncurses library will _not_ update the
screen size upon receiving SIGWINCH, and that causes the behavior
Grzesiek observed.  This is documented in ncurses(3).

It seems that the problem is not related to the environment:

# set | egrep 'LINE|COL|BASHOPTS'
BASHOPTS=checkwinsize:cmdhist:complete_fullquote:expand_aliases:extquote:force_fignore:hostcomplete:interactive_comments:login_shell:progcomp:promptvars:sourcepath
BASH_LINENO=()
COLORTERM=truecolor
COLUMNS=119
LINES=84
# ssh localhost
# set | egrep 'LINE|COL|BASHOPTS'
BASHOPTS=checkwinsize:cmdhist:complete_fullquote:expand_aliases:extquote:force_fignore:hostcomplete:interactive_comments:login_shell:progcomp:promptvars:sourcepath
BASH_LINENO=()
COLUMNS=119
LINES=84

You need to look at the output of env(1) instead.  By default bash does
not export LINES and COLUMNS, so they are not visible in child programs:

,----
| % bash
| $ echo $LINES
| 52
| $ dash
| $ echo $LINES
|
`----

Ok, you right.

--
Pozdrawiam
Grzesiek

Wysłane z kompa wolnego od wirusów Billa Gatesa.