Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powershell -NoLogo parameter render spaces between blocks #172

Closed
2 tasks done
fedeiglesias opened this issue Nov 19, 2020 · 17 comments
Closed
2 tasks done

Powershell -NoLogo parameter render spaces between blocks #172

fedeiglesias opened this issue Nov 19, 2020 · 17 comments
Labels
🐛 bug Something isn't working powershell windows

Comments

@fedeiglesias
Copy link

fedeiglesias commented Nov 19, 2020

Prerequisites

  • I have read and understand the CONTRIBUTING guide
  • I looked for duplicate issues before submitting this one

Description

Using parameter "-NoLogo" with Powershell, to avoid show the startup message the windows terminal show spaces between blocks, only in the first prompt. I will add pictures to clarify this point.

The windows terminal configuration with NoLogo parameter.
image

This is an example with the error, the first line add some spaces until press enter the problem is solved
image

This is an example running from Windows Terminal without -NoLogo param (working as expected)
image

This is an example running directly from pwsh.exe with -NoLogo param setted.
Despite not displaying the fonts correctly, it does not generate the error of spaces between blocks.
image

Environment

  • Oh my Posh version: 3.38.0-beta
  • Theme: All themes tested
  • Operating System: Windows 10 Profesional (64 bits)
  • Shell: * Powershell 7.2.0-preview.1
    * Powershell 7.1.0 - (2020-11-11)
  • Terminal: Windows Terminal Preview Version: 1.5.3142.0

Steps to Reproduce

  1. Install Oh-my-posh v3 following this guide
  2. Install Windows Terminal
  3. set "-NoLogo" in powershell parameters

Expected behavior: Using -NoLogo parameter in Powershell must render the first prompt line correctly

Actual behavior: The first line is rendered with spaces between blocks

@JanDeDobbeleer
Copy link
Owner

My first reaction is: euh...wat? I do not add spaces in between in the code. I can have a look but this is most likely a Powershell issue.

@fedeiglesias
Copy link
Author

Hi @JanDeDobbeleer First of all, nice work with Oh-myPosh! There were very few tools to spice up the windows terminals.
Yes, If it seems to be powershell because I just installed fluentTerminal from the store and the same thing happens here I leave a screenshot

image

@JanDeDobbeleer
Copy link
Owner

I'll try to reproduce. It's not because I don't understand where this is coming from, it can't be fixed 😉

@fedeiglesias
Copy link
Author

yes, apparently Powershell get angry when try to hide his beautifull startup text... Thank you for your support @JanDeDobbeleer !!!

@turtlebasket
Copy link

I'm noticing this as well with Powershell 7.1.0

@JanDeDobbeleer
Copy link
Owner

If this is rather new, I suspect the debug parameter. That's my preliminary theory for now.

@JanDeDobbeleer JanDeDobbeleer added the 🐛 bug Something isn't working label Nov 21, 2020
@JanDeDobbeleer
Copy link
Owner

I can't reproduce this on my Mac using PowerShell... I'm waiting for a Windows machine to continue testing there. Stay tuned 👍🏻

image

@fedeiglesias
Copy link
Author

@JanDeDobbeleer i dont know why, i think with the latest versions (3.44.0) this error not appear anymore 🎉!
If i have any notice about it i will report here 👍

@turtlebasket
Copy link

I'm still having this problem, even with 3.44.1. I'm not especially bothered by it (the startup message is only a marginal annoyance), but do know that this didn't happen when I tried switching oh-my-posh to v2--- so I think the problem probably has something to do with v3.

@JanDeDobbeleer
Copy link
Owner

I think the problem probably has something to do with v3.

Probably, as V3 is significantly different on how it renders this. Somehow Powershell is a bit of a PITA when it comes to ANSI although the position of the space (or rather omitting of the bg color) has in theory nothing to do with ANSI.

@rducom
Copy link

rducom commented Sep 2, 2021

workaround : add cls in your $PROFILE (and still use -NoLogo)

@LemuelKL
Copy link

Still having this issue with 5.12.1. Using @rducom 's workaround for now.

@JanDeDobbeleer
Copy link
Owner

@LemuelKL yes as it's a Windows Terminal bug we can't fix that 😁

@tommasodotNET
Copy link

I think it's related so I'm going to share this issue as well. If you set transparency effects on Win Terminal, this is how the spaces between segments won't pick up the transparency:
image

@JanDeDobbeleer
Copy link
Owner

@tommasodotNET yes, Windows Terminal does not support inverted ANSI yet. That's on their end.

@hyoretsu
Copy link

workaround : add cls in your $PROFILE (and still use -NoLogo)

That works. Though it's strange how running Windows Terminal as administrator also fixes it.

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working powershell windows
Projects
None yet
Development

No branches or pull requests

7 participants