help-bash
[Top][All Lists]
Advanced

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

Re: question .. did u implent when checkwinsize no need to exteral bin t


From: Greg Wooledge
Subject: Re: question .. did u implent when checkwinsize no need to exteral bin to update
Date: Sun, 23 Apr 2023 16:06:28 -0400

On Sun, Apr 23, 2023 at 09:01:30PM +0100, Kerin Millar wrote:
> On Sun, 23 Apr 2023 15:01:25 -0400
> Grisha Levit <grishalevit@gmail.com> wrote:
> > You can also use (:) to save an exec.
> 
> This is not case because : is a builtin. For COLUMNS and LINES to be set, 
> either the command must be external or the shell must be interactive and must 
> have received SIGWINCH.
> 
> $ bash -c 'declare -p COLUMNS LINES; :; declare -p COLUMNS LINES'
> bash: line 1: declare: COLUMNS: not found
> bash: line 1: declare: LINES: not found
> bash: line 1: declare: COLUMNS: not found
> bash: line 1: declare: LINES: not found

unicorn:~$ bash -c 'declare -p COLUMNS LINES; (:); declare -p COLUMNS LINES'
bash: line 1: declare: COLUMNS: not found
bash: line 1: declare: LINES: not found
declare -- COLUMNS="80"
declare -- LINES="24"

It refutes the documentation, but apparently what's needed is "a fork".



reply via email to

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