-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small helper for the PowerShell 50 char clipboard problem
- Loading branch information
1 parent
e3b4df9
commit c069222
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM microsoft/windowsservercore | ||
WORKDIR "Program Files" | ||
RUN rd /S /Q WindowsPowerShell\Modules\PSReadLine | ||
WORKDIR / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# PowerShell and the 50 characters clipboard problem | ||
|
||
At the moment the `microsoft/windowsservercore` image has the problem | ||
that pasting a longer text will be cut at 50 characters. | ||
|
||
Try it with the following command, copy it to clipboard, | ||
|
||
``` | ||
Write-Host Paste and execute this command does not loose characters. | ||
``` | ||
|
||
then start an interactive container | ||
|
||
``` | ||
docker run -it microsoft/windowsservercore powershell | ||
``` | ||
|
||
Now paste your clipboard into it (I also can repro it from my Mac pasting it into a Windows container). The command is missing the last two words. Try it again in microsoft/nanoserver and it will work. | ||
|
||
A fix could be removing PSReadLine from windowsservercore until it is fixed in PSReadLine module. | ||
|
||
```Dockerfile | ||
FROM microsoft/windowsservercore | ||
WORKDIR "Program Files" | ||
RUN rd /S /Q WindowsPowerShell\Modules\PSReadLine | ||
WORKDIR / | ||
``` | ||
|
||
## See also | ||
- https://github.com/moby/moby/issues/29646 | ||
- https://github.com/lzybkr/PSReadLine/issues/460 |