When pasting text into powershell in a Windows container the text is truncated at 50 characters which makes for a very frustrating and unproductive user experience.
This effect is most notable in powershell becaue of an unfortuante interaction with PSReadline however unusual/undersirable behaviour is also observed in a plain cmd terminal leading to (IIUC) the conclusion that the underlying problem is with the console itself.
This issue has been previously opened in 3 separate repositories:
...however I'm opening it here as all those issues have been closed under the assumption that the problem lies with the console itself
In the PSReadline issue @jstarks commented:
Agreed that this is annoying. We're hoping to improve the console API compatibility in
windowsservercorein the next Windows release, which I suspect will resolve this and several other issues. Currently I don't have any plans to debug this with the current set of images, unfortunately.
My main goal in opening the issue here it so I can follow any progress in fixing the problem, and in particular if there is any estimated timeline for a fix being released.
This is technically an issue with Docker on Windows, but yes, we're working on a solution.
It's just amazing that something as trivial as this is simply not working. Welcome old fashioned DOS!
@zadjii-msft Cannot wait for this to be fixed... it is so annoying... Any workaround in the interim?
See https://github.com/lzybkr/PSReadLine/issues/460#issuecomment-341733715 for a workaround.
@dhirschfeld Saved my life! Thanks a lot!
@dhirschfeld This allows me to paste fine but now you cannot go back a character or word it just deletes everything if you want to edit whatever you typed or pasted. Any workaround for that?
I'll defer back to @jstarks who is more familiar with Windows containers and might be able to share more information on the subject.
No updates on this huh? Still seems to be an issue.
Actually @jstarks might be able to comment on this. There should be a fix going in to CExecSvc (which powers docker server on windows) to fix this, but I'm not really sure about their release schedule.
This is fixed on the Windows 2019 preview image. You can try it out on azure:

Will that fix make it to 1803 or 1809?
I'd presume it's only for 1809. I don't think the Docker team was able to use our work for #57 in 1803.
Is there any of this working on 1607 ?
@malcolm-boden Nope, conpty support was only added in 1809 (October 2018 release), so you'll have to upgrade to a newer version to get the fix.
Still in 1809 馃憥
Most helpful comment
It's just amazing that something as trivial as this is simply not working. Welcome old fashioned DOS!