我想在Windows 10 Power Shell上禁用语法突出显示。
我该怎么办?
没有菜单可以根据喜好禁用它。
请注意,我使用Windows 10(周年纪念更新)
与PSReadline
模块提供的默认语法突出显示一样,然后您需要PSReadline
从PowerShell会话中删除模块:
Remove-Module PSReadline
或者,如果您想使用其他PSReadline
功能(例如持久性历史记录),则可以配置语法突出显示以对所有类型的标记使用相同的颜色:
[Microsoft.PowerShell.TokenClassification].GetEnumValues() | % {
$DefaultColor = (Get-PSReadlineOption).DefaultTokenForegroundColor
} {
Set-PSReadlineOption -TokenKind $_ -ForegroundColor $DefaultColor
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句