Closed LarsBauer closed 3 years ago
It works for me without the -Theme switch, can you tab through it and validate the autocomplete and setting of the prompt?
Thanks for the quick reply. I upgraded to the latest version and tried without the -Theme
switch. Unfortunately this does not work either.
Edit: Autocomplete for the themes works fine.
@LarsBauer allow me to validate this in the evening. I did check that so maybe there's something else that influences this negatively. It sets a config, but as the text states, it can't open that location somehow.
@LarsBauer confirmed to work on my machine, so some follow-up questions. Do you have a space in a folder somewhere? Or a mounted drive/Onedrive integration?
Yes, OneDrive integration is enabled so I guess there could be some spaces in the path. Can't check for sure because I am not on my work computer right now.
That's probably it though, will try to reproduce 😅
@LarsBauer found the issue. Fix incoming.
Just upgraded and the issue is gone. 👍 Thank you a lot for the quick fix and your dedication to this awesome tool.
Thanks for the quick reply. I upgraded to the latest version and tried without the
-Theme
switch. Unfortunately this does not work either.Edit: Autocomplete for the themes works fine.
Do you know what was causing the problem? I also find it weird it says UNABLE TO OPEN CONFIG. I'm getting this with version 3.129.0
Can you show me your invocation?
Can you show me your invocation?
Same as OP,
Import-Module oh-my-posh
Set-PoshPrompt -Theme agnoster
# or
Set-PoshPrompt agnoster
But I must say, the computer I'm using is pretty locked down for security reasons. I've tested the same in my own personal PC and it works fine with the same version. One of the reasons I wanted oh-my-posh was the git display. I'm currently settling with using posh-git directly.
@danvim I have no idea why it can't open the file, in theory you should be able to get the agnoster config, store it somewhere your user has access to and point to that file when setting the prompt.
Import-Module oh-my-posh
Set-PoshPrompt -Theme ~/agnoster.omp.json
@danvim I have no idea why it can't open the file, in theory you should be able to get the agnoster config, store it somewhere your user has access to and point to that file when setting the prompt.
Import-Module oh-my-posh Set-PoshPrompt -Theme ~/agnoster.omp.json
I am able to copy the file to C: and set the theme now. Thanks.
On the other note, ~/Documents
, where Powershell's modules get installed on this PC is on a network drive, with the path containing a $
. I'm not sure if that's a problem.
@danvim That's a problem in Powershell yes
Installed in pwsh 7 (core) under Debian Set-PoshTheme works fine
Set-PoshTheme ys Export-PoshTheme -FilePath ~/.oh-my-posh.omp.json Set-PoshPrompt -Theme ~/.oh-my-posh.omp.json
UNABLE TO OPEN CONFIG
Set-PoshTheme jandedobbeleer Export-PoshTheme -FilePath ~/.oh-my-posh.omp.json Set-PoshPrompt -Theme ~/.oh-my-posh.omp.json
Works just fine
Also works with theme Slim Have not tested others
So at least with export of theme 'ys' we get a ' UNABLE TO OPEN CONFIG'
Allow me to check that.
Allow me to check that.
I will allow that.
@rolflobker someone added a \b
in there which is a backspace character and fails to get parsed properly after export. I removed them we'll see what breaks when an issue pops up ;-)
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.
Prerequisites
CONTRIBUTING
guideDescription
After upgrading to the latest version of the PowerShell module I noticed that the theme was reset to the default one. I tried to change it but the command
Set-PoshPrompt -Theme sorin
does not work. So I started downgrading and with v3.75.0 it started working again.This is my PowerShell profile:
Environment
Steps to Reproduce
Expected behavior: The prompt should change to the selected theme.
Actual behavior: The prompt does not change.