$PSStyle.Progress.View = Minimal on some terminal types when there is output
See original GitHub issuePrerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
On 7.2 make sure you have PSStyle.Progress.View
= set to minimal.
foreach ($i in 1..100) {if ($i % 20 -eq 0) {$i} else {sleep -Milliseconds 50} Write-Progress "Checking" -PercentComplete $i }
On (e.g) Windows terminal this works as I would expect, Multiples of 20 are output and the progress bar shifts below them I can output more than a screenful and the progress remains below my output, all good.
In (e.g) the PowerShell integrated console in VS code the moving progress bar leaves past versions behind and obscures the output
Expected behavior
See Screen shot 1
Actual behavior
See screen shot 2
Error details
n/a
Environment data
PSVersion 7.2.0
PSEdition Core
GitCommitId 7.2.0
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
Visuals
1 After working correctly
2 Failing
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Using PowerShell with $PSStyle
If you need or prefer the legacy look, you can easily set that. $psstyle.Progress.view = "Classic". Use a value of 'Minimal' for the...
Read more >Write-Progress (Microsoft.PowerShell.Utility)
The Write-Progress cmdlet displays a progress bar in a PowerShell command window that depicts the status of a running command or script.
Read more >Styling your PowerShell terminal with $PSStyle - YouTube
In this video, we look at how to format your terminal with $ PSStyle. This video is part of my PowerShell training course....
Read more >$PSStyle
OutputRendering = "ANSI" Write-Warning "Be careful!" Get-Process | Select-Object -First 5 $PSStyle.Progress.View = "Minimal" $PSStyle.Progress.
Read more >7.2.md - PowerShell/PowerShell - Sourcegraph
Suppress Write-Progress in ConsoleHost if output is redirected and fix tests (#14716) · Experimental feature PSAnsiProgress : Add minimal ...
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 FreeTop 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
Top GitHub Comments
Unsure if the original problem is related, but what @daxian-dbw describes is due to a missing piece in the host impl described here.
Awesome news, thanks @jhoneill!