Thank you for your quick response and the explanations and pointers to related discussions.
2020年2月8日(土) 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='\[\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='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[[user @hostname 0 ~]$ PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[ [user@hostname 0 ~]$ PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[ 0m\]\n\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j \W]\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j \W]\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j \W]\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j \W]\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j \W]\$ '[user@hostname 0 ~]$ [user@hostname 0 ~]$ PS1='\[\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