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: Kerin Millar
Subject: Re: question .. did u implent when checkwinsize no need to exteral bin to update
Date: Sun, 23 Apr 2023 21:11:21 +0100

On Sun, 23 Apr 2023 16:06:13 -0400
Grisha Levit <grishalevit@gmail.com> wrote:

> On Sun, Apr 23, 2023, 16:01 Kerin Millar <kfm@plushkava.net> wrote:
> 
> > On Sun, 23 Apr 2023 15:01:25 -0400
> > Grisha Levit <grishalevit@gmail.com> wrote:
> >
> > > On Sun, Apr 23, 2023, 11:56 alex xmb ratchev <fxmbsw7@gmail.com> wrote:
> > >
> > > > hmm , thank you
> > > > i go the /bin/true way then
> > > >
> > >
> > > 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'
> >
> 
> Indeed, `:' by itself is not enough, but please note that my suggestion was
> `(:)', not `:'.
> 
> $ bash -c '(:); declare -p LINES'
> declare -- LINES="50"

Oh, I see. That's clever. I'm tempted to use this, though I do also wonder 
whether it's sensible to rely on a method that the manual does not explicitly 
indicate as being supported.

-- 
Kerin Millar



reply via email to

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