Closed sguergachi closed 2 years ago
@sguergachi I believe you edited the wrong profile as the error states the file (C:\Users\Sammy\Documents\PowerShell\Microsoft.PowerShell_profile.ps1) doesn’t exist. Create the profile first, the try again.
hmm ok that fixes the error, but it doesn't seem to fix the issue of installing the prompt. I'm probably missing something simple.
The Profile file is created but after running the command oh-my-posh --init --shell pwsh --config ~/atomic.omp.json | Invoke-Expression
the $PROFILE file remains empty - and opening a new terminal doesnt show the Oh My Posh prompt.
@sguergachi you have to add that line to the profile. That way it runs automatically every time you open Powershell.
Oh, I'm a complete idiot, I thought running the line in the shell would automatically add it to the profile.
Missed this instruction:
Edit $PROFILE in your preferred PowerShell version and add the following line.
That works, thanks!
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.
Code of Conduct
What happened?
I followed the install instructions here: https://ohmyposh.dev/docs/windows
For context I am using Windows Terminal 1.12.3472.0 with PowerShell 7.3.0-preview 1 as my setup. I installed Oh My Posh using winget.
For "Replace your existing prompt" I ran the following command:
oh-my-posh --init --shell pwsh --config ~/atomic.omp.json | Invoke-Expression
I haveatomic.omp.json
in $HOMEWhen I ran
. $PROFILE
the following error is returned:Theme
atomic
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output