-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Supporting the OSC 9;4 codes #14208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This would definitely be cool to see. Something that should be worked out before an implementation is started is what to do about nested progress activities. That's something that always comes up as problematic whenever trying to integrate PowerShell progress into other progress systems. |
That's an excellent point. I suppose the options are:
Options 2 and 3 are tricky, since they'd require some additional tracking in the PowerShell host that I imagine doesn't currently exist. I'm not aware of the current host architecture for progress display - are these approaches viable? |
I think this one makes the most sense personally.
Should be. |
I poked around in the ConsoleHost progress UI. It looks like this should be pretty easy to implement at a very basic level. Some things that occurred to me:
|
For reference, the |
Something similar to--or exactly matching--this just landed with #14927 |
I'd say this is adequately resolved, thanks for following up @DHowett! |
Uh oh!
There was an error while loading. Please reload this page.
Summary of the new feature/enhancement
As a user I want PowerShell to integrate with terminal features where it makes sense, especially when the terminal is providing integration with the host operating system. One such feature supported by ConEmu and Windows Terminal (as of 2020-11-18) is OS integration for visual progress indicators via
OSC9;4
ANSI codes.The
Write-Progress
cmdlet should optionally emit a ConEmu-styleOSC 9;4
progress ANSI code, controlled by a switch parameter like-EmitAnsiProgress
, and default to a global variable like$EmitAnsiProgressPreference
so that it can be enabled profile-wide.Proposed technical implementation details (optional)
When enabled via the switch parameter or the global preference variable,
Write-Progress
will emit the following OSC codes in the following circumstances:`e]9;4;st;pr`e\
st
Write-Progress -Completed
pr
Write-Progress -PercentComplete <pr>
Write-Progress
when no-PercentCompleted
has been set previouslyAn example of this behavior can be emulated by running the following PowerShell command in a terminal supporting the OSC
9;4
code:The text was updated successfully, but these errors were encountered: