You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is an issue with OMP or Powershell, but my home directory/profile has a unicode character in, and it's messing up starting the Invoke-Expression because the home path cannot be found.
My username is MyNameE² <-- notice the E2 where the 2 is floating?
So long story short, i've ended up with the following in my Profile file:
PS C:\Users\MyNameE²> oh-my-posh init pwsh
$env:POSH_SESSION_ID = "4fec6528-93e2-49e3-9e4a-12ca27196864"; $env:POSH_CONFIG = '';& 'C:\Users\MyNameE²\AppData\Local\Packages\ohmyposh.cli_96v55e8n804z4\LocalCache\Local\oh-my-posh\init.14695981039346656037.ps1'
PS C:\Users\MyNameE²> Test-Path 'C:\Users\MyNameE²\AppData\Local\Packages\ohmyposh.cli_96v55e8n804z4\LocalCache\Local\oh-my-posh\init.14695981039346656037.ps1'
True
PS C:\Users\MyNameE²> $init = oh-my-posh init pwsh
PS C:\Users\MyNameE²> Invoke-Expression $init
&: The term 'C:\Users\MyNameE┬▓\AppData\Local\Packages\ohmyposh.cli_96v55e8n804z4\LocalCache\Local\oh-my-posh\init.14695981039346656037.ps1' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
PS C:\Users\MyNameE²> $PSVersionTable
Name Value
---- -----
PSVersion 7.6.4
PSEdition Core
GitCommitId 7.6.4
OS Microsoft Windows 10.0.26200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS C:\Users\MyNameE²> $OutputEncoding
Preamble :
BodyName : utf-8
EncodingName : Unicode (UTF-8)
HeaderName : utf-8
WebName : utf-8
WindowsCodePage : 1200
IsBrowserDisplay : True
IsBrowserSave : True
IsMailNewsDisplay : True
IsMailNewsSave : True
IsSingleByte : False
EncoderFallback : System.Text.EncoderReplacementFallback
DecoderFallback : System.Text.DecoderReplacementFallback
IsReadOnly : True
CodePage : 65001
PS C:\Users\MyNameE²>
Yes, I have a workaround so you might just close this off and say "this is MS / powershell issue" or.. maybe there's a slight nuance to the string oh-my-posh init pwsh returns.
here's a cat photo to make you feel good and to say THANKS for an awesome library:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
👋🏻 Hi Jan,
Not sure if this is an issue with OMP or Powershell, but my home directory/profile has a unicode character in, and it's messing up starting the
Invoke-Expressionbecause the home path cannot be found.My username is
MyNameE²<-- notice the E2 where the 2 is floating?So long story short, i've ended up with the following in my Profile file:
and some example info
Yes, I have a workaround so you might just close this off and say "this is MS / powershell issue" or.. maybe there's a slight nuance to the string
oh-my-posh init pwshreturns.here's a cat photo to make you feel good and to say THANKS for an awesome library:
All reactions