-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Windows Terminal - PowerShell customization via oh-my-posh/posh-git Set-Theme error? #9237
Comments
Thanks for letting us know. There's a bunch of discussion over in our documentation repository about this, so I'll have to redirect you there. Cheers! |
It seems the "Set-Theme" cmdlet was renamed to "Set-PoshPrompt". |
|
For anyone still struggliong with this issue use Set-PoshPrompt, as JustDre said above, followed by the -Theme option. Here is an example: |
Oh-my-posh has updated to version 3, so adding a note to designate version 2 on this uninstall until we can return to this tutorial and update to version 3. In the meantime, there are other tutorials available on the web that walkthrough how to install OMP v3 and set it up with git status, etc.
Yeah it did work fine. Change "Set-Theme" to "Set-PoshPrompt" |
I installed the latest version of oh-my-posh i.e. if you follow the guide on microsoft don't use the required version but let it install the latest. |
Hey I'm getting this error, does anyone have a fix? I followed the tutorial in the Terminal docs here |
Hey, I had the same issue. I did |
Hey, thanks for the tip. It's working now! |
I was having the same issue as the users above me. I followed the tutorial as well. I believe this error occurs because a command given by the documentation installs an older version, see: |
I've tried all the above things, > Set-PoshPrompt -Theme Paradox
& : The term 'C:\Users\<username>\OneDrive\문서\WindowsPowerShell\Modules\oh-my-posh\3.133.1\bin\posh-windows-amd64.exe'
is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At line:1 char:23
+ ... ression (@(&"C:\Users\<username>\OneDrive\문서\WindowsPowerShell\Modules ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\<username>\...ndows-amd64.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Invoke-Expression : Cannot bind argument to parameter 'Command' because it is an empty string.
At line:1 char:19
+ ... -Expression (@(&"C:\Users\<username>\OneDrive\문서\WindowsPowerShell\Mod ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Invoke-Expression], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Invo
keExpressionCommand I don't know where the path |
Strangely enough, > Set-Theme Paradox
Hi there!
It seems you're using an oh-my-posh V2 cmdlet while running V3.
To migrate your current setup to V3, have a look the documentation.
https://ohmyposh.dev/docs/upgrading
Hi there!
It seems you're using an oh-my-posh V2 cmdlet while running V3.
To migrate your current setup to V3, have a look the documentation.
https://ohmyposh.dev/docs/upgrading
(it actually printed out twice)
> Set-PoshPrompt Paradox
& : The term 'C:\Users\<username>\OneDrive\문서\WindowsPowerShell\Modules\oh-my-posh\3.133.1\bin\posh-windows-amd64.exe' so I went to the mentioned site, then ran after I delete forcibly the "...\OneDrive\document\WindowsPowerShell\Modules\oh-my-posh" and install sorry I think it was just another path issue that doesn't relate to this issue. |
It works without the -Theme flag. Do this: Set-PoshPrompt Paradox |
Just use
on Microsoft.PowerShell_profile.ps1 file |
|
@najima1 From literally 8 comments up in this thread: #9237 (comment)
|
I did Update-Module in Powershell, |
If you are getting
Your prompt should now have your chosen theme applied to it. This worked for me, hope it helps 😊 |
I have tried everything of the above but nothing worked. What worked for me is using the following command that is in this guide (I had to use the whole path to where the themes are):
Saved this in the I was also missing some characters so i downloaded the
And then selected it in the windows terminal go to Settings -> Profiles -> PowerShell -> Appearance -> Font face on the windows terminal I hope this methods helps someone! |
THANKS A LOT ) |
It's worked! |
I updated my ExecutionPolicy to Unrestricted and then installed the Modules Again, and finally worked! |
Hey guys! How I can update/upgrade OH-MY_POSH to the latest version? |
Please file a bug on the Oh-My-Posh project. :) |
Windows Terminal - PowerShell customization via oh-my-posh/posh-git Set-Theme error?
I follow the exact tutorial of Microsoft link: Link Here video link: Video Link Here
I have installed Posh-Git and Oh-My-Posh: via this code -
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
I have installed PSReadLine: via this code -
Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
I am also created Microsoft.PowerShell_profile.ps1 file by typing- code $PROFILE, in my PowerShell profile and copy/paste this code:
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
But I get this error:
ScreenShot: Screenshot of error
The text was updated successfully, but these errors were encountered: