oh-my-posh: Powershell -NoLogo parameter render spaces between blocks

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

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

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

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

image

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

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.

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

@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 👍