Re: pseudo console and auto-wrap

2020-04-01 Thread Thomas Wolff

Am 05.03.2020 um 16:51 schrieb Takashi Yano:

Hi Thomas,

On Thu, 5 Mar 2020 11:33:33 +0100
Thomas Wolff wrote:

With ConPTY support, the following command results in output that
contains an explicit newline at the auto-wrap position:
cmd /c echo a line which is wider than your terminal ...

For copy/paste, this is surprising and undesired
(https://github.com/mintty/mintty/issues/971).
Can the line wrapping case be handled specifically, assuming proper
auto-wrap mode on the terminal side, to avoid this?

This is internal behaviour of pseudo console.
So we can not touch it. WSL also behaves the same.


https://github.com/microsoft/terminal/pull/5181 seems to intend to fix it.
--
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


Re: pseudo console and auto-wrap

2020-03-10 Thread Brian Inglis
On 2020-03-06 13:43, Thomas Wolff wrote:

> Note that winpty is obsolete under current cygwin, and the second cmd case is
> the only issue.
> As Takashi explained, there is no fix on the cygwin side. It could be fixed on
> the Windows side, within the ConPTY API.

Is conpty not available only on the latest W10 releases and winpty is required
on all earlier releases?

Is there documentation on which release has a suitable conpty level available
and which release/s require/s winpty?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
--
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


Re: pseudo console and auto-wrap

2020-03-06 Thread Bill Stewart
On Fri, Mar 6, 2020 at 3:04 PM Bill Stewart wrote:

> > As Takashi explained, there is no fix on the cygwin side. It could be
> > fixed on the Windows side, within the ConPTY API.
> > You could report it there...
>
> Thanks - found this:
>
> https://github.com/microsoft/terminal
>
> Seems that this would already be a known issue. Looking through there
> to see if this is already logged...

OK...

When I use mintty or PuTTY, the wrapping works as expected with winpty
(I still use winpty for downlevel OS versions).

When I use cmd.exe or PowerShell and run ssh.exe from there, that's
where I start seeing problems.

It seems there are weird "issues" when running ssh.exe from a Windows console.

Bill

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



Re: pseudo console and auto-wrap

2020-03-06 Thread Bill Stewart
On Fri, Mar 6, 2020 at 1:43 PM Thomas Wolff wrote:

> > With disable_pcon set:
> >
> > echo "$PATH" -- wraps correctly
> > cmd /c echo %PATH% -- wraps correctly
> > winpty cmd /c echo %PATH% -- wrapping broken
> >
> > Without disable_pcon set:
> >
> > echo "$PATH" -- wraps correctly
> > cmd /c echo %PATH%  -- wrapping broken
> > winpty cmd /c echo %PATH% -- wrapping broken
> >
> > I would note that in both cases, winpty output is not correct.
> >
> > Does anyone have any ideas on how to fix it?
> Note that winpty is obsolete under current cygwin, and the second cmd
> case is the only issue.
> As Takashi explained, there is no fix on the cygwin side. It could be
> fixed on the Windows side, within the ConPTY API.
> You could report it there...

Thanks - found this:

https://github.com/microsoft/terminal

Seems that this would already be a known issue. Looking through there
to see if this is already logged...

Bill

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



Re: pseudo console and auto-wrap

2020-03-06 Thread Thomas Wolff




Am 06.03.2020 um 19:45 schrieb Bill Stewart:

On Thu, Mar 5, 2020 at 8:52 AM Takashi Yano wrote:


Thomas Wolff wrote:

With ConPTY support, the following command results in output that
contains an explicit newline at the auto-wrap position:
cmd /c echo a line which is wider than your terminal ...

For copy/paste, this is surprising and undesired
(https://github.com/mintty/mintty/issues/971).
Can the line wrapping case be handled specifically, assuming proper
auto-wrap mode on the terminal side, to avoid this?

This is internal behaviour of pseudo console.
So we can not touch it. WSL also behaves the same.

Observations when I ssh to a Windows 10 1909 machine running cygwin
3.1.4/OpenSSH 8.2...

I ran ssh-host-config and tested both with disable_pcon set in CYGWIN
environment variable and without. (This sets REG_SZ value
HKLM\SYSTEM\CurrentControlSet\Services\cygsshd\Parameters\Environment\CYGWIN=disable_pcon)

With disable_pcon set:

echo "$PATH" -- wraps correctly
cmd /c echo %PATH% -- wraps correctly
winpty cmd /c echo %PATH% -- wrapping broken

Without disable_pcon set:

echo "$PATH" -- wraps correctly
cmd /c echo %PATH%  -- wrapping broken
winpty cmd /c echo %PATH% -- wrapping broken

I would note that in both cases, winpty output is not correct.

Does anyone have any ideas on how to fix it?
Note that winpty is obsolete under current cygwin, and the second cmd 
case is the only issue.
As Takashi explained, there is no fix on the cygwin side. It could be 
fixed on the Windows side, within the ConPTY API.

You could report it there...

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



Re: pseudo console and auto-wrap

2020-03-06 Thread Bill Stewart
On Thu, Mar 5, 2020 at 8:52 AM Takashi Yano wrote:

> Thomas Wolff wrote:
> > With ConPTY support, the following command results in output that
> > contains an explicit newline at the auto-wrap position:
> > cmd /c echo a line which is wider than your terminal ...
> >
> > For copy/paste, this is surprising and undesired
> > (https://github.com/mintty/mintty/issues/971).
> > Can the line wrapping case be handled specifically, assuming proper
> > auto-wrap mode on the terminal side, to avoid this?
>
> This is internal behaviour of pseudo console.
> So we can not touch it. WSL also behaves the same.

Observations when I ssh to a Windows 10 1909 machine running cygwin
3.1.4/OpenSSH 8.2...

I ran ssh-host-config and tested both with disable_pcon set in CYGWIN
environment variable and without. (This sets REG_SZ value
HKLM\SYSTEM\CurrentControlSet\Services\cygsshd\Parameters\Environment\CYGWIN=disable_pcon)

With disable_pcon set:

echo "$PATH" -- wraps correctly
cmd /c echo %PATH% -- wraps correctly
winpty cmd /c echo %PATH% -- wrapping broken

Without disable_pcon set:

echo "$PATH" -- wraps correctly
cmd /c echo %PATH%  -- wrapping broken
winpty cmd /c echo %PATH% -- wrapping broken

I would note that in both cases, winpty output is not correct.

Does anyone have any ideas on how to fix it?

Thanks,

Bill

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



Re: pseudo console and auto-wrap

2020-03-05 Thread Takashi Yano
Hi Thomas,

On Thu, 5 Mar 2020 11:33:33 +0100
Thomas Wolff wrote:
> With ConPTY support, the following command results in output that 
> contains an explicit newline at the auto-wrap position:
> cmd /c echo a line which is wider than your terminal ...
> 
> For copy/paste, this is surprising and undesired 
> (https://github.com/mintty/mintty/issues/971).
> Can the line wrapping case be handled specifically, assuming proper 
> auto-wrap mode on the terminal side, to avoid this?

This is internal behaviour of pseudo console.
So we can not touch it. WSL also behaves the same.

-- 
Takashi Yano 

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