'When i install oh my posh get an error , how to fix it?

enter image description here

how to fix it?

help me fix an error Oh My Posh Error:

open https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v7.59.0/themes/default.omp.json: The filename, directory name, or volume label syntax is incorrect.



Solution 1:[1]

Maintainer here. Can you create an issue on GitHub? That way I can help you see what’s wrong. What I need is the following:

  • oh-my-posh lines added to your profile
  • a bit of patience

https://github.com/JanDeDobbeleer/oh-my-posh/issues/new/choose

Solution 2:[2]

I faced a similar issue. As a workaround I included the full path to the theme in my $PROFILE.

oh-my-posh init pwsh --config $env:LOCALAPPDATA\Programs\oh-my-posh\themes\default.omp.json | Invoke-Expression

Solution 3:[3]

No clue what your PowerShell profile looks like, but from someone with the same issue, instead of using:

oh-my-posh init pwsh --config [theme] | Invoke-Expression

in your profile, try using:

Set-PoshPrompt -Theme [theme]

instead, replacing [theme] with an actual theme (you can get more information about this by using the command Get-PoshThemes).

Microsoft also has a page about installing Oh-My-Posh on PowerShell: https://docs.microsoft.com/en-us/windows/terminal/tutorials/custom-prompt-setup.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jan De Dobbeleer
Solution 2 Derek Cochran
Solution 3 12beesinatrenchcoat