Git Product home page Git Product logo

Comments (7)

TBBle avatar TBBle commented on June 12, 2024 1

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.

Thraka avatar Thraka commented on June 12, 2024

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.

TheWashiba avatar TheWashiba commented on June 12, 2024

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.

Thraka avatar Thraka commented on June 12, 2024

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.

TheWashiba avatar TheWashiba commented on June 12, 2024

I installed it thru Install-Module as suggested, I'm on Powershell 5.1 version. @Thraka

from powerline.

microhobby avatar microhobby commented on June 12, 2024

@TheWashiba how did you solve this issue, I am having the same behavior here.

from powerline.

TheWashiba avatar TheWashiba commented on June 12, 2024

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

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.