Closed Descalon closed 3 years ago
@Descalon that smells like a bug. I'll check.
@Descalon how do you invoke oh-my-posh? I don't have this issue.
Windows (using the push module):
macOS (Invoke-Expression):
I'm importing the module and invoking Set-PoshPrompt -Theme
:
Import-Module Get-ChildItemColor
$Env:GIT_SSH = $null
Import-Module -Name posh-git
Import-Module -Name posh-sshell
Import-Module -Name posh-with
Import-Module -Name oh-my-posh
$modulePath = Resolve-Path "$PSScriptRoot/PsExtensions.psm1"
Import-Module $modulePath -Force
Set-PoshPrompt -Theme agnoster
Set-PSReadLineOption -Colors @{
Parameter = 'DarkMagenta'
Operator = 'Magenta'
String = 'Green'
}
Import-Module -Name ZLocation
I'll check, maybe posh-with has something to do with it.
Your guess as it being one of the other modules is correct! It was Get-ChildItemColor
:
I'll take this issue up with the maintainer for that module! Thanks for the help, though!
@JanDeDobbeleer In my case, a newline keeps on getting created until the prompt is filled up.
Here you can notice that the newline is not rendered on the end:
My $PROFILE
only contains this:
Invoke-Expression (oh-my-posh --init --shell pwsh --config "themes\iterm2.omp.json")
@itsmeboy0 I'll check that theme. There's zero logic that can explain it popping up sometimes and sometimes not in oh-my-posh.
@itsmeboy0 found it! Its because of "vertical_offset": 1,
which pushes the prompt down 1 line. And at the end of the terminal, there's obviously no space which is why it's not an issue there. That took me WAY tool long to see 😓
Great. Removing that has worked, thanks
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.
Prerequisites
CONTRIBUTING
guideDescription
After every command (or before rendering the prompt) a newline is added.
Environment
Steps to Reproduce
Write-Host foo
Expected behavior: No new line before rendering prompt (or make it customizable through config):
Actual behavior: [What actually happened] Newline before rendering prompt: