Clear-Host does not clear the entire Windows Terminal after running Lee's rick-roll
See original GitHub issueSteps to reproduce
iex (New-Object Net.WebClient).DownloadString("http://bit.ly/e0Mw9w")
Expected behavior
After terminating the rick-roll, executing clear-host
should clear the entire console but it does not.
Actual behavior
This is my console right after executing clear-host
:
Notice that there is still text at the bottom of the screen. I don’t see this problem in the PowerShell console. It appears that the script resets what PS thinks is the terminal size. That actually resets the console size but that does not impact the Windows Terminal tab size. Before running the script, PS sees the WIndows Terminal buffer/window size as:
BufferSize : 121,68
WindowSize : 121,68
After the script runs (and is aborted by pressing Q
)) it is:
BufferSize : 83,45
WindowSize : 83,45
It would appear Clear-Host
is operating on bad buffer/size data.
Environment data
Name Value
---- -----
PSVersion 7.2.0-preview.5
PSEdition Core
GitCommitId 7.2.0-preview.5
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Related: #644
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (1 by maintainers)
Top Results From Across the Web
Clear Screen in PowerShell and Command Line without ...
In using the clear command, the screen clears. Totally. I no longer have access to any of the stuff that was previously on...
Read more >How to clear the entire terminal (PowerShell)
right click on the powershell button, then select clear, when you are at the command window, type "clear" command, to clear the terminal...
Read more >Windows Terminal Troubleshooting
This guide addresses some of the common errors and obstacles you may encounter when using Windows Terminal.
Read more >Windows Terminal tips and tricks
In this page, you will find tips and tricks to help improve your Windows Terminal experience.
Read more >Custom actions in Windows Terminal
Quit. This closes all open terminal windows. A confirmation dialog will appear in the current window to ensure you'd like to close all...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@237dmitry ignore the script. This issue is really about why the following breaks
Clear-Host
functionality in Windows Terminal:Yup, a simple repro is to dump a bunch of text to the terminal (dir ~) and then execute: