Switching to PowerLine + Additional minor changes
Styling will be based on PowerLine module. Placed _ll command/alias correctly based on platform
This commit is contained in:
parent
79e85bb21d
commit
86c1189211
8 changed files with 48 additions and 6 deletions
|
@ -7,7 +7,14 @@ $global:IsOutputANSICompatible = (
|
|||
)
|
||||
Get-Command -ListImported Set-PSReadLineKeyHandler -ErrorAction SilentlyContinue |
|
||||
ForEach-Object { Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete }
|
||||
if( (Get-Command -ListImported Set-PoshPrompt -ErrorAction SilentlyContinue) -and $IsOutputANSICompatible ) {
|
||||
if( (Get-Command -ListImported Set-PowerLinePrompt -ErrorAction Ignore) ) {
|
||||
$global:PSOSName = [SystemName]::_GetValidValues("",$true,$true) | Select-Object -First 1
|
||||
|
||||
if( Test-Path variable:global:GitPromptSettings ) {
|
||||
$global:GitPromptSettings.TruncatedBranchSuffix = [char]0x2026
|
||||
}
|
||||
Set-PowerLinePrompt
|
||||
} elseif( (Get-Command -ListImported Set-PoshPrompt -ErrorAction Ignore) -and $IsOutputANSICompatible ) {
|
||||
$local:poshPrompt = Join-Path $HOME ".oh-my-posh.omp.json"
|
||||
if( -not (Test-Path $poshPrompt) ) { $poshPrompt = "slim" }
|
||||
Set-PoshPrompt -Theme $poshPrompt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue