JanDeDobbeleer / oh-my-posh2

A prompt theming engine for Powershell
MIT License
5.19k stars 284 forks source link

Modifying prompt to indicate WSL #309

Closed tig closed 4 years ago

tig commented 4 years ago

I use PowerShell both in Windows and WSL. My host name and user is the same in both.

Can I change the prompt on Linux to show that I'm in WSL?

JanDeDobbeleer commented 4 years ago

There's a environment variable you can look for: WSL_DISTRO_NAME. If that one's set, you know you're inside of the WSL. I'll add that context for sure to go-my-posh.

tig commented 4 years ago

There's a environment variable you can look for: WSL_DISTRO_NAME. If that one's set, you know you're inside of the WSL. I'll add that context for sure to go-my-posh.

Awesome. And now I know about go-my-posh. What rock have I been under?

tig commented 4 years ago

Does go-my-posh completely replace oh-my-posh?

Does oh-my-posh now USE go-my-posh?

JanDeDobbeleer commented 4 years ago

Does go-my-posh completely replace oh-my-posh?

Not yet, but I intend to do that once we're somewhere on feature parity (only the git segment needs a few additions) That means that it will indeed use go-my-posh underneath as the go-my-posh powershell package already does that.

JanDeDobbeleer commented 4 years ago

What rock have I been under?

To be fair, I'm only open about this for a month or so :-)

tig commented 4 years ago

What happens if both oh-my-posh and go-my-posh are installed?

JanDeDobbeleer commented 4 years ago

What happens if both oh-my-posh and go-my-posh are installed?

You can choose which one to use. They do not conflict with each other in terms of commands.

JanDeDobbeleer commented 4 years ago

@tig I finally decided what direction I will go with Go my Posh, it's going to be Oh my Posh V3 from now on. I added your request here. Should be fairly straightforward. If you want to give things a go, the docs are live as well.