Traditionally, the module was the only way to install oh-my-posh using
Today, with the shift to the executable version over a year ago, it only acts as a wrapper around the
executable, offering no additional functionality. Throughout the year, the following changes have been made:
- don't ship all binaries in the Module but download on
- move all functionality from the Module to the init script
There's a problem with the Module due to the following:
- downloading the binary is a problem on company managed computers
- the module syncs cross device thanks to OneDrive sync, causing versions to be out of sync and configs to break
- it's impactful having to explain the difference time and time again (for me)
Remove the module's cached files
Remove-Item $env:POSH_PATH -Force -Recurse
If you added custom elements to this location, they will be deleted with the command above. Make sure to move these before running the command.
See your platform's installation guide. The preferred ways are winget and Homebrew.
Uninstall the PowerShell module
Uninstall-Module oh-my-posh -AllVersions
Delete the import of the PowerShell module in your
Adjust setting the prompt
If you're still using
Set-PoshPrompt, replace that statement with the following:
I have a custom theme
oh-my-posh init pwsh --config ~/.custom.omp.json | Invoke-Expression
~/.custom.omp.json with the location of your theme.
I have an out-of-the-box theme
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression
jandedobbeleer.omp.json with the theme you use.
Only winget and scoop add the environment variable
POSH_THEMES_PATH automatically. For Homebrew, use
$(brew --prefix oh-my-posh)/themes/jandedobbeleer.omp.json.