From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76585 invoked by alias); 8 Feb 2020 15:29:24 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 76576 invoked by uid 89); 8 Feb 2020 15:29:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=20202, screen X-HELO: mail-lj1-f170.google.com Received: from mail-lj1-f170.google.com (HELO mail-lj1-f170.google.com) (209.85.208.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2020 15:29:23 +0000 Received: by mail-lj1-f170.google.com with SMTP id q8so2441399ljb.2 for ; Sat, 08 Feb 2020 07:29:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=oCSXK5zXNMRUKA2QTo07S+HVCGaZE8AQ6lzCagaDB2U=; b=XTka1ZWYoPypc83vZNF4486GnR/zWeGu33ZNyLrHU8hwNpUbGREXPM5p/6G9SjvTuY EgR/koCaLfC41Tq8tkXojb7lV41V/A2p6sc/PuMGDpuKmhCrJiuW5DtLlmg6lCSCjkh6 VJuaedZAzfcY86SQNmbF7QF00PgEa+PEfPM2rdyWKYesuvs9SAzyzP4pXmYgQ9Tml+6x Fj9/c8BnUdNQMVIbGBKz+Mak7jAiBbvBHC4EXLUT7UqbxX0CpxQEP9sjak40VCl9A4wI z3L8pykrUGVYYznCeCJmCu5bU0fv7wBO1h+k8yRgNwTM5IMf8/xL8VUYSRqw9YiTaBKl HpOA== MIME-Version: 1.0 References: <20200208232500.8d938b55f031316e196a1e84@nifty.ne.jp> In-Reply-To: <20200208232500.8d938b55f031316e196a1e84@nifty.ne.jp> From: Koichi Murase Date: Sat, 08 Feb 2020 15:29:00 -0000 Message-ID: Subject: Re: Cygwin-3.1.3: Terminal contents are overwritten by less graphical ones on the start of non-Cygwin programs To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00066.txt.bz2 Thank you for your quick response and the explanations and pointers to related discussions. 2020=E5=B9=B42=E6=9C=888=E6=97=A5(=E5=9C=9F) 22:25 Takashi Yano > From https://www.cygwin.com/ml/cygwin/2019-10/msg00063.html > > The pseudo console has its own screen buffer behind, and redraws the > screen based on the screen buffer at undetermined timing. I'm not sure if I correctly understand the situation, but does this mean we cannot prevent the pseudo console from redrawing the screen (i.e., sending some texts and escape sequences to the terminal emulators) based on its background screen buffer? For that reason do we need to keep the terminal contents of both the terminal emulator and the background screen consistent with each other? > > * The problem is not restricted in just clearing graphic styles of > > characters. For GNU Screen I use Screen-specific terminal sequences > > (snip) > > How can I reproduce this? For example, in GNU screen, [user@hostname 0 ~]$ PS1=3D'\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j \W]\$ ' [user@hostname 0 ~]$ [user@hostname 0 ~]$ [user@hostname 0 ~]$ [user@hostname 0 ~]$ [user@hostname 0 ~]$ [user@hostname 0 ~]$ [user@hostname 0 ~]$ [user@hostname 0 ~]$ ./nocyg where ./nocyg is the program in the original mail. Then it turnes into something like: [user@hostname 0 ~]$ PS1=3D'\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[[user @hostname 0 ~]$ PS1=3D'\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[ [user@hostname 0 ~]$ PS1=3D'\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[= \e[ 0m\]\n\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1=3D'\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h= \j \W]\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1=3D'\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h= \j \W]\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1=3D'\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h= \j \W]\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1=3D'\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h= \j \W]\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1=3D'\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h= \j \W]\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1=3D'\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h= \j \W]\$ '[user@hostname 0 ~]$ ./nocyg [user@hostname 0 ~]$ > > * As well as non-Cygwin programs, also Cygwin programs `ssh', `scp' or > > `git push/pull' with SSH connections cause the same results. I > > guess SSH utilities internally use non-Cygwin programs. (Actually I > > originally faced with this problem with these "Cygwin" commands.) > > I cannot reproduce this. Cygwin ssh, scp and git does not triggers > redraw screen in my environment. > > Do you surely execute *cygwin* command rather that windows one? Yes, I'm using those commands from Cygwin (the command "type ssh scp git" shows /usr/bin/... for all of them). I'm sorry I found the reason. I have been specifying a shell script for the SSH option `ProxyCommand' in my `~/.ssh/config'. In that shell script, I was using a Windows system command to retrieve the current network configuration. Thank you, Koichi -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple