JanDeDobbeleer / oh-my-posh2

A prompt theming engine for Powershell
MIT License
5.18k stars 281 forks source link

Weird line appered when i start my terminal #331

Closed giansluca closed 3 years ago

giansluca commented 3 years ago

Hi, I'm getting new messy string when i launch my terminal (Windows terminal). I haven't seen it before, It suddenly appeared, and now is there every time i open the terminal. If i press enter i got back my normal propmt, as shown in the picture attached.

Theme is robbyrussel. If i disable "Set-Theme" in my profile, the string disapperas.

Screenshot 2020-12-06 at 09 59 53
tushev commented 3 years ago

Same here. In my case it looks like: image

I'm running PowerShell 7.1.0. I also have Cygwin installed (in case it matters, cause some utilities like git may (or may not) be called from Cygwin). I tried deleting everything in %USERPROFILE%\Documents\PowerShell and then

Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
Set-Prompt

as suggested in README.md here. No effect.

The next line (once I press enter) looks OK.


UPD: Tried updating to the latest version: Update-Module -Name oh-my-posh -AllowPrerelease -Scope CurrentUser - no effect.

giansluca commented 3 years ago

now i realized, if i enter in a git folder i get a total mess

Screenshot 2020-12-06 at 10 58 27
tushev commented 3 years ago

I've just solved the problem for myself - I ran C:\Windows\System32\rundll32.exe sysdm.cpl,EditEnvironmentVariables.

Then I put X:\*Git for Windows* above X:\*Cygwin* in PATH environment variable (so Git for Windows goes first).

Now everything seems to be working.

JanDeDobbeleer commented 3 years ago

All you need to do is import git's bin folder and you should have all you need. That's how I did it back in my Windows days. I would avoid using Cygwin altogether. Just use the WSL if you need a proper working unix environment.

giansluca commented 3 years ago

I've just solved the problem for myself - I ran C:\Windows\System32\rundll32.exe sysdm.cpl,EditEnvironmentVariables.

Then I put X:\*Git for Windows* above X:\*Cygwin* in PATH environment variable (so Git for Windows goes first).

Now everything seems to be working.

yes it works :D