Comments (7)
I just bounced off this. The problem is that whatever is importing the psd1 file is seeing '>'
and thinks it's a shell redirect. I changed it to ">"
and it works correctly.
Techically, it's correct, because the ScriptBlock is being exported with '
delimiters, even though they were created with {}
delimiters, so in the file, it's seeing:
ScriptBlock ' '>' * ($nestedPromptLevel + 1) '
which actually puts the >
outside the string, and hence it's a redirection, as noticed by Import-Metadata
. Not sure if this is a bug in PowerLine's Export-PowerLinePrompt
. It might be, because the actual thing the user typed was
{ '>' * ($nestedPromptLevel + 1) }
Otherwise, it might just be a limitation that you cannot put '
in a Powerline script, and the README.md where this example comes from needs updating to use ">"
, and maybe mention not to use '
in the ScriptBlocks as Export-PowerLinePrompt
won't do what you wanted.
from powerline.
Doing some quick searching I found that you're locked down for some reason. This could be based on your OS perhaps (windows server?) or your IT department has locked down powershell.
Either way, you want to start investigating by searching for pslanguagemode powershell
. Somewhere in that config area is your answer. I'm not familiar with this, so I can't really help you. I even found this about IIS though that may be too old to help. Unsure.
from powerline.
I'm using Windows 10 Pro 1803, although it's licensed by university (Microsoft Imagine program), are you saying this could have an impact somehow? @Thraka
I've also ran the "echo $Host.Runspace.LanguageMode", it showed FullLanguage mode was on.
from powerline.
Unsure, I'm just letting you know what I found from doing some searches.
How did you install it? I used Install-Module I believe.
I don't have a roaming\powershell
directory either. Are you using PowerShell 6?
from powerline.
I installed it thru Install-Module
as suggested, I'm on Powershell 5.1
version. @Thraka
from powerline.
@TheWashiba how did you solve this issue, I am having the same behavior here.
from powerline.
@TheWashiba how did you solve this issue, I am having the same behavior here.
I don't remember, have switched to bash long time ago.
from powerline.
Related Issues (20)
- Install failed HOT 6
- 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
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.