I just want to raise awareness of the "50 chars paste" problem in Windows containers. It got worse comparing to previous Docker images. The problem started to happen in windowsservercore, but now I also can reproduce it in nanoserver image with PowerShell 6 RC.
docker run -it microsoft/powershell:6.0.0-rc-nanoserver-1709
Then paste a longer command, eg. $(gp "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion")
It should paste the whole command.

As you can see this is a productivity killer.
PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-rc
PSEdition Core
GitCommitId v6.0.0-rc
OS Microsoft Windows 10.0.16299
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PSProvider : Microsoft.PowerShell.Core\Registry
All three GH issues got closed, but the community can't see a solution other than removing the PSReadLine file inside the container.
How can we proceed to get this fixed?
+1 for the GIF because this is actually a cool demo of PowerShell in docker.
OK, I'll post there. I hope that PSReadLine ticket will be re-opened then :-)
This has been closed as a dup of lzybkr/PSReadLine#460, however in that issue @lzybkr states:
At any rate, I think it's obvious there's nothing I can do to fix this in PSReadLine, but if someone finds a workaround, then that'd be great.
...so if the underlying issue isn't a PSReadline problem could this issue please be reopened and investigated.
Note: I've posted the same in moby/moby#27793 which was also closed as a dup of lzybkr/PSReadLine#460. I'm not sure myself if the underlying problem is with moby or powershell but since it is a real and significant problem for users it would be great if it could be investigated further.
We can keep this opened for now until we identify which component has the issue
@dhirschfeld - As noted in lzybkr/PSReadLine#460, the problem reproduces in cmd.exe as well, so this is definitely not a PSReadLine nor PowerShell bug.
@jstarks is aware of the issue and believes this will be fixed in the next Windows release, see his comment.
Thanks for the update - I was a bit frustrated that there were three issues in three repositories all closed as "not my problem" - and the others all singled out PSReadline as the culprit!
I saw the comment by @jstarks but it would be good to get an idea of which Windows/Container version will get the fix. It's still present on 2016 with the latest (29-hour old) windowservercore container. I can check my 1709 server but some rough ETA would be greatly appreciated since it's now over a year since it was first identified.
Since the console team believes they will address this, I'm reclosing this.
Is there a repo for the console team where users can open / subscribe to an issue so as to get updates on any progress?
@dhirschfeld perhaps open an issue here if they don't have one already: https://github.com/microsoft/console
This is a daily annoyance for me working with windows containers and has been for the last 7 months. It really is ridiculous that i have to toggle psreadline on and off to paste in long lines of code. I like command completion so yes I have to turn it back on when I want to do things quickly.
Another I would say pretty sparsely documented quirk is having to turn off tty to see the output of some programs, important programs that are part of the git tool chain like sshagent, there have been others that I cannot recall atm.
It really gives the user the impression that docker for windows is somehow not as good or cared for as docker on linux, which i'm sure isn't the truth.
Otherwise things are going well, but please is there anyway this can be fixed?
The linked microsoft/console issue says it's fixed in Win10 Oct2018 update and Windows Server 2019 with no plans to take it downlevel.
I can confirm the issue is fixed with the Windows Server 2019 and the corresponding mcr.microsoft.com/windows/servercore:ltsc2019 image. And with lots of other improvements it鈥榮 worth to upgrade once the 2019 release is available (again).
Most helpful comment
OK, I'll post there. I hope that PSReadLine ticket will be re-opened then :-)