JanDeDobbeleer / oh-my-posh

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

Windows Terminal - Blank spaces in first prompt, not in subsequent prompts #1542

Closed RobFosterNYC closed 2 years ago

RobFosterNYC commented 2 years ago

Code of Conduct

What happened?

A bug happened!

I have gone to PowerShell - They informed me to post and speak to Terminal repo. (( https://github.com/PowerShell/PowerShell/issues/16690 ))

I have gone to Terminal - They also closed my case and said this was not them, and that it was Oh-My-Posh. (( https://github.com/microsoft/terminal/issues/12100 ))

Even though many other people in the "Terminal" repo issue page, report and confirm the same problem. And some people in "Terminal" repo issue page, are saying that its possibly due to the -NoLogo in PowerShell / Terminal. (( https://github.com/microsoft/terminal/issues/8341 ))

Someone in "Terminal" repo issue page found a Band-Aid fix for the time being, When putting < Clear-Host > At the end of the profile file, everything seems to work properly. People have found this Band-Aid for the time being, until an actual fix happens.

Please read my closed cases as they go more into detail...

Thank you.

Theme

Any theme

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Version: 6.42.4

Segments:

ConsoleTitle(true) -   1 ms -
session(true)  -   0 ms -  * 
path(true)     -   0 ms -   C:\ 
git(false)     -  41 ms -
battery(false) -   3 ms -
node(false)    -   1 ms -
shell(true)    -   0 ms -  ﲵ uni 
root(false)    -   0 ms -
text(true)     -   0 ms -  NO CONFIG 
exit(true)     -   0 ms -   

Run duration: 48.585ms

Logs:

2022/01/06 07:38:43 debug: getenv
C:\Users\*\AppData\Local
2022/01/06 07:38:43 getenv duration: 0s, args: LOCALAPPDATA
2022/01/06 07:38:43 getCachePath duration: 0s, args:
2022/01/06 07:38:43 getArgs duration: 0s, args:
2022/01/06 07:38:43 getArgs duration: 0s, args:
2022/01/06 07:38:43 getShellName duration: 0s, args:
2022/01/06 07:38:43 debug: getenv

2022/01/06 07:38:43 getenv duration: 0s, args: OMP_CACHE_DISABLED
2022/01/06 07:38:43 isRunningAsRoot duration: 506.9µs, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 getShellName duration: 0s, args:
2022/01/06 07:38:43 getCurrentUser duration: 0s, args:
2022/01/06 07:38:43 getHostName duration: 0s, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 debug: getenv

2022/01/06 07:38:43 getenv duration: 0s, args: SSH_CONNECTION
2022/01/06 07:38:43 debug: getenv

2022/01/06 07:38:43 getenv duration: 0s, args: SSH_CLIENT
2022/01/06 07:38:43 getCurrentUser duration: 0s, args:
2022/01/06 07:38:43 getRuntimeGOOS duration: 0s, args:
2022/01/06 07:38:43 getHostName duration: 0s, args:
2022/01/06 07:38:43 debug: getenv

2022/01/06 07:38:43 getenv duration: 0s, args: POSH_SESSION_DEFAULT_USER
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getArgs duration: 0s, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getRuntimeGOOS duration: 0s, args:
2022/01/06 07:38:43 getRuntimeGOOS duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 getRuntimeGOOS duration: 0s, args:
2022/01/06 07:38:43 stackCount duration: 0s, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getRuntimeGOOS duration: 0s, args:
2022/01/06 07:38:43 hasCommand duration: 41.3605ms, args: git.exe
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 error: hasParentFilePath
CreateFile C:\.git: The system cannot find the file specified.
2022/01/06 07:38:43 hasParentFilePath duration: 509.3µs, args: .git
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getBatteryInfo duration: 3.1016ms, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 hasFiles duration: 0s, args: *.js
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 hasFiles duration: 510µs, args: *.ts
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 hasFiles duration: 0s, args: package.json
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 hasFiles duration: 0s, args: .nvmrc
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 hasFiles duration: 0s, args: pnpm-workspace.yaml
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 hasFiles duration: 0s, args: .pnpmfile.cjs
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 hasFiles duration: 0s, args: .npmrc
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getShellName duration: 0s, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 isRunningAsRoot duration: 0s, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 isRunningAsRoot duration: 0s, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 getPathSeperator duration: 0s, args:
2022/01/06 07:38:43 getShellName duration: 0s, args:
2022/01/06 07:38:43 getCurrentUser duration: 0s, args:
2022/01/06 07:38:43 getHostName duration: 0s, args:
2022/01/06 07:38:43 getcwd duration: 0s, args:
2022/01/06 07:38:43 lastErrorCode duration: 0s, args:
j4james commented 2 years ago

Just to be clear here, the actual Windows Terminal devs are currently treating this as a bug in Windows Terminal (that is why microsoft/terminal#8341 is still open). The person that told you this wasn't a bug is not a Windows Terminal developer. The reason that your issue was closed is because it was a duplicate of 8341.

237dmitry commented 2 years ago

that is why microsoft/terminal#8341 is still open

This issue is still open due to the fact that this is a Windows Console Host bug. Windows Terminal is just an add-on above it, and not an independent terminal that was written from scratch. Naturally, they can't solve it themselves. I will hopefully wait for Windows 12.

RobFosterNYC commented 2 years ago

Just to be clear here, the actual Windows Terminal devs are currently treating this as a bug in Windows Terminal (that is why microsoft/terminal#8341 is still open). The person that told you this wasn't a bug is not a Windows Terminal developer. The reason that your issue was closed is because it was a duplicate of 8341.

Aah, the way he was acting & answering like my situation didn't matter, I thought he worked for microsoft as a developer. I started to feel like no one wanted to be bothered as I was getting bounced around. Thank you for explaining in detail and letting me know. 🤗

JanDeDobbeleer commented 2 years ago

@RobFosterNYC definitely this one https://github.com/microsoft/terminal/issues/8341, so I would follow-up there. We can't fix that ;-)

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.