Comments (10)
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.
$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.
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.
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.
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.
Am getting the same on Win10 x64 1703.
from powerline.
I just submitted pull request #20 to address
from powerline.
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.
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.
I'm going to close this, since I believe it's long since been resolved by docs changes
from powerline.
Related Issues (20)
- PowerLine fails to import saved prompt including a single-quoted string HOT 2
- Get-SegmentedPath variably handles alternative PSDrives with bugs
- Conditional block colors HOT 1
- Special characters is not shown in powershell. HOT 4
- List available blocks + how to add them.
- Run this every time ? HOT 2
- Install fails without -AllowClobber HOT 1
- Can't install with Pansies 1.4.0-beta03 HOT 1
- Error with separator HOT 1
- Support for no background colour HOT 4
- Loading profile info from Documents\WindowsPowerShell even when running on PSCore HOT 1
- Where is the prompt settings stored? HOT 4
- Doesn't work in Powershell Core HOT 3
- Needed to install prerelease Pansies HOT 4
- Error With New PowerShell 7.1 preview 2 - Get-Date Usage Needs Full Parameter Name HOT 2
- Exception in PowerLinePrompt HOT 7
- PowerLine 3.4.0 fails to read a config that worked with 3.3.0 HOT 8
- Req: A community theme repo HOT 2
- "Exception thrown from prompt block" even when the exception is handled within the block HOT 5
- What is the correct way to write a clear final separator?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerline.