Skip to content

Instantly share code, notes, and snippets.

@technic
Created October 28, 2019 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save technic/2238916d5736456d64994eb383757323 to your computer and use it in GitHub Desktop.
Save technic/2238916d5736456d64994eb383757323 to your computer and use it in GitHub Desktop.
oh-my-posh workaround

The old winpty has a bug, when running terminal in VS Code: after executing MinGW command escape sequencies are broken.

We can disable those by modifying theme file in a following way

    if ($env:ConEmuANSI -eq "ON") {
        $prompt += Set-CursorForRightBlockWrite -textLength ($timestamp.Length + 1)
        $prompt += Write-Prompt $timeStamp -ForegroundColor $sl.Colors.PromptForegroundColor    
    }

and by setting env:ConEmuANSI="OFF" in the VS Code terminal environment for Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment