PowerLine.format.ps1xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<Configuration>
    <ViewDefinitions>
        <View>
            <Name>PowerLine-Preview</Name>
            <ViewSelectedBy>
                <TypeName>PowerLine.Theme</TypeName>
            </ViewSelectedBy>
            <CustomControl>
                <CustomEntries>
                    <CustomEntry>
                        <CustomItem>
                            <ExpressionBinding>
                                <ScriptBlock>
                                    $CurrentTheme = Get-PowerLineTheme
                                    $_ | Set-PowerLineTheme
                                    "$( Write-PowerLinePrompt )`n`n$(
                                      $PSRL = $_.PSReadLinePromptText
                                      @(if ($PSRL.Count -ge 2) {
                                        "PSReadLine PromptText:"
                                        $PSRL[0] + "$([char]27)[0m'Normal Prompt'"
                                        $PSRL[1] + "$([char]27)[0m'Incomplete"
                                      }) -join "`n")"
                                    $CurrentTheme | Set-PowerLineTheme
                                </ScriptBlock>
                            </ExpressionBinding>
                        </CustomItem>
                    </CustomEntry>
                </CustomEntries>
            </CustomControl>
        </View>
    </ViewDefinitions>
</Configuration>