Created
June 15, 2023 14:43
-
-
Save mdgrs-mei/244496f094abc367d46a64d6c7f7dd7e to your computer and use it in GitHub Desktop.
Show spinner on the Windows Terminal tabs for every command.
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
$global:originalPSConsoleHostReadLine = $function:global:PSConsoleHostReadLine | |
$global:originalPrompt = $function:global:Prompt | |
$function:global:PSConsoleHostReadLine = { | |
$startProgressIndicator = "`e]9;4;3;50`e\" | |
$command = $originalPSConsoleHostReadLine.Invoke() | |
$startProgressIndicator | Write-Host -NoNewLine | |
$command | |
} | |
$function:global:Prompt = { | |
$stopProgressIndicator = "`e]9;4;0;50`e\" | |
$stopProgressIndicator | Write-Host -NoNewLine | |
$originalPrompt.Invoke() | |
} |
Author
mdgrs-mei
commented
Jun 15, 2023
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment