KiY*_*ter 3 powershell windows-10
我想在windows 10 power shell上禁用语法高亮显示.
我怎么能这样做?
没有菜单可以在首选项上禁用它.
请注意,我使用的是Windows 10(周年更新)
作为PSReadline模块提供的默认语法突出显示,您需要PSReadline从PowerShell会话中删除模块:
Remove-Module PSReadline
Run Code Online (Sandbox Code Playgroud)
或者,如果您想使用其他PSReadline功能(如持久性历史记录),您可以配置语法突出显示以对所有类型的令牌使用相同的颜色:
[Microsoft.PowerShell.TokenClassification].GetEnumValues() | % {
$DefaultColor = (Get-PSReadlineOption).DefaultTokenForegroundColor
} {
Set-PSReadlineOption -TokenKind $_ -ForegroundColor $DefaultColor
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
913 次 |
| 最近记录: |