Powershell 对于键入的命令,如何更改power shell编辑器的颜色?
在powershell中,当我键入某个命令时,它会变成黄色,这对我来说不是很明显,如何更改该颜色?Powershell 对于键入的命令,如何更改power shell编辑器的颜色?,powershell,Powershell,在powershell中,当我键入某个命令时,它会变成黄色,这对我来说不是很明显,如何更改该颜色? 或者更好,使用[控制台]:ForegroundColor=“Black”。此外,还有其他选择,如: C:\WINDOWS\system32> $host.privatedata ErrorForegroundColor : Red ErrorBackgroundColor : Black WarningForegroundColor : Yellow WarningBackg
或者更好,使用
[控制台]:ForegroundColor=“Black”
。此外,还有其他选择,如:
C:\WINDOWS\system32> $host.privatedata
ErrorForegroundColor : Red
ErrorBackgroundColor : Black
WarningForegroundColor : Yellow
WarningBackgroundColor : Black
DebugForegroundColor : Yellow
DebugBackgroundColor : Black
VerboseForegroundColor : Yellow
VerboseBackgroundColor : Black
ProgressForegroundColor : Yellow
ProgressBackgroundColor : DarkCyan
C:\WINDOWS\system32> $host.ui.RawUI
ForegroundColor : Green
BackgroundColor : Black
CursorPosition : 0,64
WindowPosition : 0,18
CursorSize : 25
BufferSize : 120,3000
WindowSize : 120,50
MaxWindowSize : 120,88
MaxPhysicalWindowSize : 265,88
KeyAvailable : False
WindowTitle : Administrator: Windows PowerShell
使用这些设置,您可以更改配置文件,以便在每次启动Powershell时应用它们。更多信息。可能重复的
Set PSReadlineOption-TokenKind命令-ForegroundColor Black
@PetSerAl请将其作为答案发布,它已修复了问题。我运行了ur命令,但重新启动powershell后,它再次显示黄色。因为您需要更改配置文件以修复此问题,使用这些设置,您可以更改配置文件,以便在每次启动Powershell时应用它们。
检查我的答案和其中的链接。