答案1
更改下面显示的命令输出的值:
分别输入命令$host.PrivateData.[element name] = "[color code/name]"
、
$PSStyle.[element name] = "[color code/name]"
和Set-PSReadLineOption -Colors @{ "[element name]"="[color code/name]"}
。
有关上述命令的更多信息,请参见:
- 关于$host.PrivateData:https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-host?view=powershell-7.2#example-8-set-the-background-color-for-error-messages
- 关于$PSStyle:https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_ansi_terminals?view=powershell-7.2#psstyle
- 关于 Set-PSReadLineOption:https://docs.microsoft.com/en-us/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.2