JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.06k stars 2.37k forks source link

[Windows] oh-my-posh.exe exits immediately #968

Closed tigerinus closed 3 years ago

tigerinus commented 3 years ago

Code of Conduct

What happened?

Actual:

The prompt showed up, but terminated and went back to cmd.

Expect:

The prompt shows up and stays that way as a new prompt.

Version

4.1.0

Theme

Default

What OS are you seeing the problem on?

Windows

Which shell are you using?

other (please specify)

Relevant log output

C:\Users\xiaoh\AppData\Local\bin>oh-my-posh.exe -debug

Here are the timings of segments in your prompt:

ConsoleTitle(true) -   0 ms -
session(true)  -   0 ms -  xiaoh@powerberry 
path(true)     -   0 ms -   bin 
git(false)     -  13 ms -
battery(true)  -  11 ms -  100 
node(false)    -   0 ms -
shell(true)    -   0 ms -  ﲵ explorer 
root(false)    -   0 ms -
text(true)     -   0 ms -  NO CONFIG 
exit(true)     -   0 ms -   
JanDeDobbeleer commented 3 years ago

Please read the installation guide. You need to configure your shell.

tigerinus commented 3 years ago

Please read the installation guide. You need to configure your shell.

I am trying to understand the logic behind the installation guide, before following it. The part I am confused about is the need of PowerShell.

I see there is a different section specifically for PowerShell, so I am assuming this Windows section is about Command Prompt cmd.exe customization. But I could be wrong.

Just to confirm - is this Windows installation guide for Command Prompt customization, or PowerShell?

JanDeDobbeleer commented 3 years ago

The Powershell installation guide is for the Powershell module. That's the same functionality, but wrapped and only useable from Powershell.

The Windows installation guide is to be able to use oh-my-posh in ANY shell, including Powershell. Given that you have the binary installed, you can follow the Windows guide and select the Powershell configuration on that page.

github-actions[bot] commented 6 months ago

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.