X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20BB33842411
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1613454538;
	bh=Ss8ZCVrR+ntX1CunHk8mF4T39nPlGLBEzPuqtDOYT74=;
	h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=kYTtNW91S3WKeP/beowqwrr0PP3AHzfQpyP3VLcm+ukEdoPzunbFyvr5QFSkG+jee
	 xMNOx3xnH6zgCwig1nIF1i/HwTA48sAHSX8f6o15D/P7N176g7HfCGVzoY69ariYLU
	 vAKyfHOVYv4Cy8hIQ02wjAI+rDGFMCIV4Ls4CXB8=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E4AC23851C27
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=HcWx5Bj09jipdejF4L1i/7AJLMGVJEnUYShtY9OMGwk=;
 b=PKb5I+njTyiBSjKO4ayUMCVWSe949OrzvUKCxeiqrJyx0ATwyN5ALwU76lvGASyjNO
 qNunEe7oKLkVqram7Tyvlva1g06ZSpd0+QQD6AmXtA5jwt4z6Ay3rpHyiep1skQvwAa+
 /08RvS7lsl5Nn4xsCFhWwRxB6n1FuRyiGobSo2NAKfVGkX/E2C/tsHvV8XCyaqg8vtDb
 kkIdHkadOuSpsnLvfJ+hq24UbqkpB6+AivQG/o8DaAg7dVQCGLfg7ApOiZgae/qhqWxQ
 R2zhoLceY8KrYDzEgRICW7+yhEcF1s7LPx4M191bfFUllaczyQuwXxw7XzIVUDaMomLi
 bIVQ==
X-Gm-Message-State: AOAM531QriLif/+wHv13fbIymtfENel9SYNhMw804QqKEgslPVTK8TWC
 dckYhIyNxSQQtL4X8/EFbOlLrDdSZz4VEg==
X-Google-Smtp-Source: ABdhPJyKeXcwzsqgMen6+tOiACYiWs82tWXDyjaAsLYYDg9ApmzlaamFTwRx58oYcm2WBQAZeWn5HA==
X-Received: by 2002:a7b:c206:: with SMTP id x6mr1782983wmi.48.1613454532057;
 Mon, 15 Feb 2021 21:48:52 -0800 (PST)
Subject: Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal
To: cygwin@cygwin.com
References: <CABPP8W9h=LzUGf=JP-2x3SjrBPh8NJuoRbXzRU94b-WfBt94yw@mail.gmail.com>
 <20210214174358.f828f285a566846254c3c54a@nifty.ne.jp>
 <60298BB0.1070301@tlinx.org>
 <20210215090543.afa8fac6ebec42faa471a5c6@nifty.ne.jp>
 <602B2B20.1030003@tlinx.org>
Message-ID: <1d266c7d-4915-8ff9-069a-04c1f5226eab@gmail.com>
Date: Tue, 16 Feb 2021 06:48:51 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.7.0
MIME-Version: 1.0
In-Reply-To: <602B2B20.1030003@tlinx.org>
Content-Language: it
X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00, BODY_8BITS,
 DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM,
 NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
 TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Marco Atzeri via Cygwin <cygwin@cygwin.com>
Reply-To: Marco Atzeri <marco.atzeri@gmail.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces@cygwin.com
Sender: "Cygwin" <cygwin-bounces@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 11G5n1nU001179

On 16.02.2021 03:17, L A Walsh wrote:
> 
> 
> On 2021/02/14 16:05, Takashi Yano wrote:
>> On Sun, 14 Feb 2021 12:44:32 -0800
>> L A Walsh wrote:
>>> showsize () {\
>>>   declare s=$(stty size); s="(${s// /x})"  ;\
>>>   printf "%s" "$s${s//?/$'\b'}"       ;\
>>> }; export -f showsize
>>>
>>> trap showsize SIGWINCH
>>> -----
>>
> 
>>
>> What do you mean by "reset LINES/COLUMNS"? I am not sure what
>> is the behaviour diffrence in Linux and cygwin you mentioned.
> ---
>      Actually not sure I can reproduce this now.  The only
> thing I am noticing is that if bash is attached to /dev/pts3
> (as in mintty), it works, but if attached to /dev/cons0 (as in
> cmd.exe), nothing works as no signal is propagated from
> the window resize to running program.
> 
>      AFAIK, though, that's always been one of multiple probs in using 
> windows cmd with a bash shell.
> 

maybe this is waht you are looking for:

# This causes bash to check the terminal size after every command
# and adjusts $LINES and $COLUMNS to the correct values.
shopt -s checkwinsize


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

