Check for $PSStyle variable
This commit is contained in:
parent
b6daf28f13
commit
513c645436
1 changed files with 39 additions and 37 deletions
|
@ -115,6 +115,7 @@ Set-PSReadLineKeyHandler -Chord Shift+Spacebar -Function SelfInsert
|
||||||
|
|
||||||
# Colours for a light-coloured terminal.
|
# Colours for a light-coloured terminal.
|
||||||
# https://learn.microsoft.com/en-us/powershell/scripting/learn/shell/using-light-theme?view=powershell-7.2
|
# https://learn.microsoft.com/en-us/powershell/scripting/learn/shell/using-light-theme?view=powershell-7.2
|
||||||
|
if ($null -ne $PSStyle) {
|
||||||
$ISETheme = @{
|
$ISETheme = @{
|
||||||
Command = $PSStyle.Foreground.FromRGB(0x0000FF)
|
Command = $PSStyle.Foreground.FromRGB(0x0000FF)
|
||||||
Comment = $PSStyle.Foreground.FromRGB(0x006400)
|
Comment = $PSStyle.Foreground.FromRGB(0x006400)
|
||||||
|
@ -153,6 +154,7 @@ $PSStyle.FileInfo.Extension['.ps1xml'] = "`e[36m"
|
||||||
$PSStyle.FileInfo.Extension['.psd1'] = "`e[36m"
|
$PSStyle.FileInfo.Extension['.psd1'] = "`e[36m"
|
||||||
$PSStyle.FileInfo.Extension['.psm1'] = "`e[36m"
|
$PSStyle.FileInfo.Extension['.psm1'] = "`e[36m"
|
||||||
Remove-Variable ISETheme
|
Remove-Variable ISETheme
|
||||||
|
}
|
||||||
|
|
||||||
# Keep this at the end.
|
# Keep this at the end.
|
||||||
if (Test-Path "$PSScriptRoot/local.ps1") {
|
if (Test-Path "$PSScriptRoot/local.ps1") {
|
||||||
|
|
Loading…
Reference in a new issue