Created
November 3, 2017 20:04
-
-
Save bgelens/f9aa8b376bee90e9f38a06f28e254319 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-PowerLinePrompt ` | |
-SetCurrentDirectory ` | |
-RestoreVirtualTerminal ` | |
-PowerLineFont ` | |
-FullColor ` | |
-Title { | |
$title = "PowerShell {0} - {1} ({2}) - PID: {3}" -f $PSVersionTable.PSVersion.ToString(),(Convert-Path $pwd), $pwd.Provider.Name,$PID | |
if (Test-Elevation) { | |
"Elevated - $title" | |
} else { | |
$title | |
} | |
} ` | |
-Prompt @( | |
{ "`t" }, | |
{ New-PromptText { Get-Elapsed } -BackgroundColor DarkGray -ForegroundColor Black -ErrorForegroundColor White -ErrorBackgroundColor DarkRed }, | |
{ New-PromptText { Get-Date -f "T" } -BackgroundColor Gray -ForegroundColor Black }, | |
{ "`n" }, | |
{ New-PromptText { $MyInvocation.HistoryId } -BackgroundColor Blue -ForegroundColor White }, | |
{ New-PromptText { "$([PoshCode.Pansies.Entities]::ExtendedCharacters["Gear"])" * $NestedPromptLevel } -BackgroundColor Blue -ForegroundColor White } | |
{ if($pushd = (Get-Location -Stack).count) { New-PromptText { "$([char]187)" + $pushd } -BackgroundColor DarkGray -ForegroundColor White } } | |
{ New-PromptText { (Get-SegmentedPath) -join ([PoshCode.Pansies.Entities]::ExtendedCharacters["Separator"]) } -BackgroundColor DarkBlue -ForegroundColor White }, | |
{ | |
if ($null -ne (Write-GitStatusPowerLine)) { | |
New-PromptText { "$([PoshCode.Pansies.Entities]::ExtendedCharacters["Branch"]) $(Get-GitBranch)" } -BackgroundColor DarkGray -ForegroundColor White | |
} | |
} | |
) | |
Export-PowerLinePrompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -Module PowerLine,PSGit,Pansies | |
[PoshCode.Pansies.Entities]::ExtendedCharacters["Gear"] = ([char]0x263C) |
Yeah, I know about save 😄 Export was easier while experimenting to make sure it didn't overwrite all the time.
No the char was not saved to the config
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you use
-Save
you can skip the Export.And I thought the extended characters are included in the export, are they not re-importing right?