delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/02/16/00:49:02

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT 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 AT cygwin DOT com
References: <CABPP8W9h=LzUGf=JP-2x3SjrBPh8NJuoRbXzRU94b-WfBt94yw AT mail DOT gmail DOT com>
<20210214174358 DOT f828f285a566846254c3c54a AT nifty DOT ne DOT jp>
<60298BB0 DOT 1070301 AT tlinx DOT org>
<20210215090543 DOT afa8fac6ebec42faa471a5c6 AT nifty DOT ne DOT jp>
<602B2B20 DOT 1030003 AT tlinx DOT 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>
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 AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Marco Atzeri via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019