Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Windows 10 PowerShell上禁用语法高亮显示?_Powershell_Windows 10 - Fatal编程技术网

如何在Windows 10 PowerShell上禁用语法高亮显示?

如何在Windows 10 PowerShell上禁用语法高亮显示?,powershell,windows-10,Powershell,Windows 10,我想禁用windows 10 power shell上的语法高亮显示 我该怎么做? 没有菜单在首选项上禁用它 请注意,我使用windows 10(周年更新)作为默认语法突出显示,由PSReadline模块提供,然后您需要从PowerShell会话中删除PSReadline模块: Remove-Module PSReadline 或者,如果您想使用其他PSReadline功能(如持久历史记录),您可以配置语法高亮显示以对所有类型的令牌使用相同的颜色: [Microsoft.PowerShell.

我想禁用windows 10 power shell上的语法高亮显示

我该怎么做?
没有菜单在首选项上禁用它


请注意,我使用windows 10(周年更新)

作为默认语法突出显示,由
PSReadline
模块提供,然后您需要从PowerShell会话中删除
PSReadline
模块:

Remove-Module PSReadline
或者,如果您想使用其他
PSReadline
功能(如持久历史记录),您可以配置语法高亮显示以对所有类型的令牌使用相同的颜色:

[Microsoft.PowerShell.TokenClassification].GetEnumValues() | % { 
    $DefaultColor = (Get-PSReadlineOption).DefaultTokenForegroundColor
} {
    Set-PSReadlineOption -TokenKind $_ -ForegroundColor $DefaultColor
}

删除模块PSReadline
或(如果您想保留其他
PSReadline
功能):
[Microsoft.PowerShell.TokenClassification].GetEnumValues()|%{Set-PSReadlineOption-TokenKind$\u1-ForegroundColor(Get-PSReadlineOption)。DefaultTokenForegroundColor}
@PetSerAl:将其作为ans。我会投票给它。