delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/04/30/11:05:45

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 550A23861036
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1619794975;
bh=qWfo+lSA8TO4jron1XHKVabJlpAqeHCQ1gRBwFyBuGY=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=Sf3kYNQ+lVy8e1KB9fVG/lfqCkcfU/80iKuvmSvPs2fN/HZkNr7uyN6iOiaSTSgOc
umOOATd31iLuv52nSrQ1zMnDUyuvrteQQibAw/qjBpWzra1NFqiGUog2KX9p4oPKrA
dMwNp3Vc355H2kuPhbwdGaib1qRtUTcgTIJQUKgY=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 265053857438
Date: Fri, 30 Apr 2021 09:02:49 -0600
To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Subject: Re: Screen clearing in CMD without "Legacy Console Mode"
Message-ID: <YIwcGRttJhUueeRG@kevinlocke.name>
References: <YIwTSMfJu9uMwrKn AT kevinlocke DOT name>
<20210430235358 DOT 2ae6daa41e3f0b6cb0daa173 AT nifty DOT ne DOT jp>
MIME-Version: 1.0
In-Reply-To: <20210430235358.2ae6daa41e3f0b6cb0daa173@nifty.ne.jp>
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE,
SPF_PASS 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: Kevin Locke via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Kevin Locke <kevin AT kevinlocke DOT name>
Cc: cygwin AT cygwin DOT com, Johannes Schindelin <johannes DOT schindelin AT gmx DOT de>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On Fri, 2021-04-30 at 23:53 +0900, Takashi Yano wrote:
> On Fri, 30 Apr 2021 08:25:12 -0600 Kevin Locke wrote:
>> I'm investigating an issue in Git for Windows[^1], which also affects
>> Cygwin.  The issue is that, when using CMD (i.e. Command Prompt) on
>> Windows 10 1703 or above with "Legacy Console Mode"[^2] disabled, if
>> TERM=cygwin is set in the environment, the console is not cleared when
>> vi exits.  To demonstrate, with Cygwin 3.2.0, in CMD with "Legacy
>> Console Mode" disabled:
>> 
>> cd C:\cygwin64
>> set TERM=cygwin
>> bin\vi etc\bash.bashrc
>> :q
>> 
>> After exiting vi, the console window has not been cleared and content
>> from etc\bash.bashrc remains visible, making further use of the console
>> difficult until cleared.
> 
> Why on earth do you want to set TERM=cygwin?
> If you don't set TERM=cygwin, TERM is automatically set to
> xterm-256color, in which the issue does not occur.

Unfortunately, I am not clear on that myself.[^6]  According to Johannes
Schindelin[^7]:

> We specifically set TERM so that Cygwin (or more correctly, the MSYS2 runtime) uses ANSI sequences...

Hopefully he (or another of the Git for Windows contributors) can add
more specifics.

Thanks,
Kevin

[^6]: https://github.com/git-for-windows/git/issues/3177#issuecomment-828507812
[^7]: https://github.com/git-for-windows/git/issues/3177#issuecomment-826834976

-- 
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