Git Product home page Git Product logo

Comments (10)

uberrich avatar uberrich commented on June 3, 2024 2

I had the same problem as @dotps1, but as suggested by @weloytty I changed $PowerLinePrompt to [PowerLine.Prompt]$PowerLinePrompt, and also manually changed my powerline.psm1 file to add the changes from #20 and it worked! Yay! :-)

from powerline.

weloytty avatar weloytty commented on June 3, 2024 1

$So then I started looking at $error.

I resolved the problem by specifiying the [RgbColor] Parameters as [PoshCode.Pansies.RgbColor]

I have no idea on the crossplatform implications of this, it only served to get it running on my work machine, on win7sp1. I'll try it on my home win10 machine as soon as I get there.

from powerline.

dotps1 avatar dotps1 commented on June 3, 2024 1

i am also getting the last two errors from the orginal post,

The property 'UseAnsiEscapes' cannot be found on this object. Verify that the property exists and can be set.
The property 'RestoreVirtualTerminal' cannot be found on this object. Verify that the property exists and can be set.

Running Win10 x64 1702

from powerline.

Jaykul avatar Jaykul commented on June 3, 2024 1

I don't understand how these issues escaped my notice. This was a busy summer, but I'm really frustrated about this. I thought I'd been monitoring things well! At least since August ;-)

Anyway. I ripped this all apart and putt it back together much more simply in 3.0 -- which I'm ready to release this weekend, so I'm not going to try and address this any further. I pulled the changes in #20 even though I don't understand why you needed them, so I'm going to suggest you try 3.0 and let me know if it doesn't address this.

The configurations are going to be much simpler, which unfortunately is a breaking change -- but I think when you try to use it, you'll agree it's better 😉

from powerline.

weloytty avatar weloytty commented on June 3, 2024

so if I explicitly identify $PowerLinePrompt as [PowerLine.Prompt], I get a bit further, however, the custom prompt:

[PowerLine.Prompt]$PowerLinePrompt = 1, @( $null, @( @{ text = { New-PowerLineBlock (Get-Elapsed) -ErrorBackgroundColor DarkRed -ErrorForegroundColor White -ForegroundColor Black -BackgroundColor DarkGray } } @{ bg = "Gray"; fg = "Black"; text = { Get-Date -f "T" } } ) ), @( @{ bg = "Red"; fg = "Yellow"; text = { if ($Global:IsAdmin) { "ADMIN" } else { "" } } }, @{ bg = "Yellow"; fg = "Red"; text = { $Env:ComputerName } }, @{ bg = "DarkBlue"; fg = "White"; text = { $location = $(Get-Location).Path #$location = $location.Replace("Microsoft.PowerShell.Core\FileSystem::","") Convert-Path -Path $location } } )

Gets me a prompt of

PS>

if I replace the $null in the first line with "", the prompt will display something -- just the second line though (first line is still omitted)

from powerline.

 avatar commented on June 3, 2024

Am getting the same on Win10 x64 1703.

from powerline.

weloytty avatar weloytty commented on June 3, 2024

I just submitted pull request #20 to address

from powerline.

weloytty avatar weloytty commented on June 3, 2024

Once I figured out how 3.0 worked, I agree -- I do like it better, and I have it working for me. And dont worry about not seeing the issue, it looks as if you have a lot on your plate!

I fear though, that the problem still exists, and I can't figure out why: I have to change RgbColor to PoshCode.Pansies.RbgColor but I also have to change [List] to [System.Collections.Generic.List]. It's got to be some environmental thing, but I get the behavior on both my work Win10 (Anniversary) laptop and my home machine (Win10 whatever the slow ring is currently running).

I'll submit a pull request here in a few to show what I did to make it work again for me.

from powerline.

Jaykul avatar Jaykul commented on June 3, 2024

Yeah, you would need a using namespace PoshCode.Pansies and using namespace System.Collections.Generic in order to not need to use the fully qualified class name...

from powerline.

Jaykul avatar Jaykul commented on June 3, 2024

I'm going to close this, since I believe it's long since been resolved by docs changes

from powerline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.