Closed keawade closed 7 years ago
Yeah. A few people have reported this. I'm seeing it now in the VS Code integrated terminal (but nowhere else). It's due to this bug: https://github.com/PowerShell/PowerShell/issues/1177
The workaround (since that fix is only in PowerShell 6.0 as far as I know) would be to call the API to set the console mode such as posh-git added here https://github.com/dahlbyk/posh-git/blob/24-bit-color/src/ConsoleMode.ps1
But I'm not sure we want everyone to call that, we'll could end up needlessly setting the ConsoleMode or four times just in the prompt function...
Okay, I tried just using the PowerShell 6 Alpha 17 (This solved the gibberish issue) but it isn't loading either $env:USERPROFILE/Documents/WindowsPowerShell/Profile.ps1
or $env:USERPROFILE/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
when it starts.
I can't seem to find documentation of any profile location changes either. I was able to get my profile partially working by manually executing the script and verified that this solves the gibberish problem. However, most of my custom stuff isn't working since it isn't being loaded as a profile.
I tracked down the new profile location for PowerShell 6. For anyone else attempting this fix, the profile location for your installation is stored in the global variable $PSHOME
. This isn't documented explicitly in the Windows installation instructions but is in a note in the Linux installation instructions.
Every time I run the commands
git clone
,git pull
, orgit push
my terminal's output get's turned into what look like the underlying character codes.I'm using HyperTerm but have verified that this occurs even in regular PowerShell.
My PowerLine config is just a slightly modified version of the demo in the Readme:
I'm using the font Fira Code to provide PowerLine support and ligatures.